• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 01:11
CET 07:11
KST 15:11
  • 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
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband
Tourneys
RSL Offline Finals Info - Dec 13 and 14! Sparkling Tuna Cup - Weekly Open Tournament StarCraft Evolution League (SC Evo Biweekly) Sea Duckling Open (Global, Bronze-Diamond) $5,000+ WardiTV 2025 Championship
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
Foreign Brood War BGH Auto Balance -> http://bghmmr.eu/ Data analysis on 70 million replays BW General Discussion MBCGame Torrents
Tourneys
Small VOD Thread 2.0 [Megathread] Daily Proleagues [BSL21] RO16 Group D - Sunday 21:00 CET [BSL21] RO16 Group A - Saturday 21:00 CET
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile ZeroSpace Megathread The Perfect Game
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread The Big Programming Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
I decided to write a webnov…
DjKniteX
Physical Exertion During Gam…
TrAiDoS
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1110 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 3h 49m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft691
RuFF_SC2 234
StarCraft: Brood War
Britney 37486
PianO 1104
Zeus 842
GuemChi 796
Leta 219
JulyZerg 219
ggaemo 133
Noble 24
sorry 24
Sacsri 19
[ Show more ]
ZergMaN 16
Hm[arnc] 4
Dota 2
NeuroSwarm121
Super Smash Bros
C9.Mang0847
hungrybox411
AZ_Axe55
Heroes of the Storm
Khaldor141
Other Games
summit1g10119
ViBE234
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• Berry_CruncH163
• Hupsaiya 130
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1257
Upcoming Events
Sparkling Tuna Cup
3h 49m
WardiTV 2025
5h 49m
OSC
8h 49m
IPSL
10h 49m
Bonyth vs KameZerg
BSL 21
13h 49m
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
1d 2h
Wardi Open
1d 5h
StarCraft2.fi
1d 9h
Monday Night Weeklies
1d 10h
Replay Cast
1d 17h
[ Show More ]
WardiTV 2025
2 days
StarCraft2.fi
2 days
PiGosaur Monday
2 days
StarCraft2.fi
3 days
Tenacious Turtle Tussle
3 days
The PondCast
4 days
WardiTV 2025
4 days
StarCraft2.fi
4 days
WardiTV 2025
5 days
StarCraft2.fi
6 days
RSL Revival
6 days
IPSL
6 days
Sziky vs JDConan
Liquipedia Results

Completed

Proleague 2025-12-04
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
WardiTV 2025
META Madness #9
Kuram Kup
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
RSL Offline Finals
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 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.