• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 03:42
CEST 09:42
KST 16:42
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy9uThermal's 2v2 Tour: $15,000 Main Event18
Community News
Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris30Weekly Cups (Aug 11-17): MaxPax triples again!13Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195
StarCraft 2
General
What mix of new and old maps do you want in the next 1v1 ladder pool? (SC2) : Weekly Cups (Aug 18-24): herO dethrones MaxPax A Eulogy for the Six Pool Geoff 'iNcontroL' Robinson has passed away 2v2 & SC: Evo Complete: Weekend Double Feature
Tourneys
WardiTV Mondays Maestros of The Game—$20k event w/ live finals in Paris RSL: Revival, a new crowdfunded tournament series Sparkling Tuna Cup - Weekly Open Tournament Monday Nights Weeklies
Strategy
Custom Maps
External Content
Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below
Brood War
General
[ASL20] Ro24 Preview Pt2: Take-Off No Rain in ASL20? BW General Discussion Flash On His 2010 "God" Form, Mind Games, vs JD BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[ASL20] Ro24 Group F [ASL20] Ro24 Group E [Megathread] Daily Proleagues [IPSL] CSLAN Review and CSLPRO Reimagined!
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates [G] Mineral Boosting Muta micro map competition
Other Games
General Games
General RTS Discussion Thread Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV Path of Exile
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread The year 2050 European Politico-economics QA Mega-thread
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
High temperatures on bridge(s) Gtx660 graphics card replacement Installation of Windows 10 suck at "just a moment"
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
Evil Gacha Games and the…
ffswowsucks
Breaking the Meta: Non-Stand…
TrAiDoS
INDEPENDIENTE LA CTM
XenOsky
[Girl blog} My fema…
artosisisthebest
Sharpening the Filtration…
frozenclaw
ASL S20 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2004 users

matlab signals

Blogs > howerpower
Post a Reply
howerpower
Profile Blog Joined June 2010
United States619 Posts
August 09 2011 21:23 GMT
#1
I'm taking a signals and systems course this summer and the professor sprang this project on us near the end of semester without ever introducing us to matlab. I've used the program before but never for a big project like this, although I think I'm learning it rather quickly.
I am however, getting stumped here.

I'm trying to code this filter in matlab, I know to define t as t=linspace(-pi/2,pi/2,17) but I guess what is confusing me the most is the part about defining the value of K.

Consider the filter {hn} which is defined by the sampled values of the cosine wave
h(t) = K cos(t), t ∈ (−π/2, π/2),
at 17 points uniformly distributed in the interval (−π/2, π/2). Define value of K from the condition
Σh_n = 1



Count9
Profile Blog Joined May 2009
China10928 Posts
August 09 2011 21:30 GMT
#2
I'm taking a signals and systems course this summer and the professor sprang this project on us near the end of semester without ever introducing us to matlab

Wait what? You guys really went through a whole semester of signals and systems without any matlab models? What school is this?
awu25
Profile Joined April 2010
United States2003 Posts
August 09 2011 21:31 GMT
#3
Isn't K the amplifying constant or something? I vaguely remember doing this in my Signals class. If you increased K, it would increase the response time or something, but at the same time cause a lot of overshoot. Don't really remember though, but I remember putting in random values in MATLAB for K. It sounds like you're trying to solve for a specific K value
josemb40
Profile Blog Joined March 2009
Peru611 Posts
Last Edited: 2011-08-09 21:32:11
August 09 2011 21:31 GMT
#4
oh god, matlab, i hated that program. Can't you email your professor asking him for some kind of guide or advice about the project?
wiiiiiiiiiiiiiiiii
howerpower
Profile Blog Joined June 2010
United States619 Posts
Last Edited: 2011-08-09 21:43:42
August 09 2011 21:37 GMT
#5
h=cos(t)
h=h/sum(h)

output is now
sum(h)=1

...profit?
I'm not sure if this is right but it does make sum(h)=1 lululul

actually I'm pretty positive it's right...guess I just needed to visit teamliquid to get my brain to work properly
Horuku
Profile Blog Joined August 2010
United States405 Posts
August 09 2011 21:44 GMT
#6
What kind of filter are you talking about? At what frequency range do you need the amplification to be = 1?
d<^^>b
forSeohyun
Profile Blog Joined May 2011
504 Posts
Last Edited: 2011-08-09 21:54:08
August 09 2011 21:51 GMT
#7
Isn't it just Σh_n = ΣK cos(pi/(2*17)*n - pi/2) = 1 => K = 1/ ΣK cos(pi/(2*17)*n - pi/2)? n=0...17

This is because the gain of the filter is Σ|h(n)|^2 and you probably want that to be 1.

Or am I being stupid?

(I have read a couple of signals and systems/dsp/control courses)

Seohyun fan
TwistedHelix
Profile Joined July 2010
United States50 Posts
Last Edited: 2011-08-09 22:10:05
August 09 2011 21:55 GMT
#8
I'm taking a swing at this.
Converting the signal from cont. to discrete:

sum(h{n})= k sum[from n=-8 to 8] cos(n * pi /16)

The logic here is 1 period of the time domain is 2 * pi, and 1 period is 32 samples (16 in half a cycle, the 17 includes a point in the second half, which would mean h{n=-8}=0, and h{n=8}=0... thats how i understand it).
Sorry my sum doesnt start at 0, you can shift if you like.
Note our domain is the positive part of the cosine graph.
You should just be able to set the equation equal to 1, then evaluate.

1= k sum[from n=-8 to 8] cos(n * pi /16)


edit: changed wording
Primadog
Profile Blog Joined April 2010
United States4411 Posts
August 09 2011 23:45 GMT
#9
A bit rusty, but I think K=2. The best way is to just test the results and see what you get.
Thank God and gunrun.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
August 10 2011 02:42 GMT
#10
My partner did everything, I only tested so I don't really know >.<
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
Please log in or register to reply.
Live Events Refresh
Next event in 2h 18m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Horang2 3017
Sea 2448
Stork 367
Larva 267
Tasteless 251
ggaemo 180
Backho 178
Nal_rA 173
Pusan 156
PianO 139
[ Show more ]
soO 46
TY 36
ToSsGirL 29
Sacsri 8
Sharp 5
Dota 2
NeuroSwarm71
Fuzer 25
Counter-Strike
Stewie2K329
Other Games
summit1g8345
singsing882
WinterStarcraft452
ceh9364
SortOf103
Organizations
Other Games
gamesdonequick598
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH358
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Rush1122
• Lourlo832
• Stunt776
Upcoming Events
Afreeca Starleague
2h 18m
hero vs Alone
Royal vs Barracks
Replay Cast
16h 18m
The PondCast
1d 2h
WardiTV Summer Champion…
1d 3h
Clem vs Classic
herO vs MaxPax
Replay Cast
1d 16h
LiuLi Cup
2 days
MaxPax vs TriGGeR
ByuN vs herO
Cure vs Rogue
Classic vs HeRoMaRinE
Cosmonarchy
2 days
OyAji vs Sziky
Sziky vs WolFix
WolFix vs OyAji
BSL Team Wars
2 days
Team Hawk vs Team Dewalt
BSL Team Wars
2 days
Team Hawk vs Team Bonyth
SC Evo League
3 days
TaeJa vs Cure
Rogue vs threepoint
ByuN vs Creator
MaNa vs Classic
[ Show More ]
Maestros of the Game
3 days
ShoWTimE vs Cham
GuMiho vs Ryung
Zoun vs Spirit
Rogue vs MaNa
[BSL 2025] Weekly
3 days
SC Evo League
4 days
Maestros of the Game
4 days
SHIN vs Creator
Astrea vs Lambo
Bunny vs SKillous
HeRoMaRinE vs TriGGeR
BSL Team Wars
4 days
Team Bonyth vs Team Sziky
BSL Team Wars
4 days
Team Dewalt vs Team Sziky
Monday Night Weeklies
5 days
Replay Cast
5 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

CSLAN 3
uThermal 2v2 Main Event
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL Season 18: Qualifier 1
Acropolis #4 - TS1
CSL Season 18: Qualifier 2
SEL Season 2 Championship
WardiTV Summer 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSL 2025 AUTUMN (S18)
LASL Season 20
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
RSL Revival: Season 2
Maestros of the Game
EC S1
Sisters' Call Cup
IEM Chengdu 2025
PGL Masters Bucharest 2025
MESA Nomadic Masters Fall
Thunderpick World Champ.
CS Asia Championships 2025
Roobet Cup 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.