• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 10:01
CET 16:01
KST 00:01
  • 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 Revival - 2025 Season Finals Preview7RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly 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 win3
StarCraft 2
General
RSL Revival - 2025 Season Finals Preview Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced
Tourneys
RSL Offline Finals Info - Dec 13 and 14! Tenacious Turtle Tussle 2025 RSL Offline Finals Dates + Ticket Sales! Sparkling Tuna Cup - Weekly Open Tournament StarCraft2.fi 15th Anniversary Cup
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ [BSL21] RO8 Bracket & Prediction Contest BW General Discussion FlaSh on: Biggest Problem With SnOw's Playstyle Let's talk about Metropolis
Tourneys
[ASL20] Grand Finals [BSL21] RO8 - Day 2 - Sunday 21:00 CET [BSL21] RO8 - Day 1 - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers Game Theory for Starcraft Fighting Spirit mining rates Current Meta
Other Games
General Games
Dawn of War IV Path of Exile Stormgate/Frost Giant Megathread Awesome Games Done Quick 2026! Nintendo Switch Thread
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 Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread YouTube Thread European Politico-economics QA Mega-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
TL+ Announced Where to ask questions and add stream?
Blogs
How Sleep Deprivation Affect…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1757 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
WardiTV 2025
13:00
Seeding Matches
SHIN vs herO
Clem vs herO
SHIN vs Clem
Clem vs ShoWTimE
WardiTV1517
ComeBackTV 902
TaKeTV 435
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
BRAT_OK 59
MindelVK 33
Railgan 22
DivinesiaTV 15
StarCraft: Brood War
Britney 44593
Calm 3633
Bisu 1363
Jaedong 1025
Horang2 1018
Stork 735
Hyuk 533
EffOrt 265
firebathero 262
actioN 214
[ Show more ]
Last 166
Hyun 135
Zeus 108
Sharp 105
Killer 74
Aegong 51
ToSsGirL 39
scan(afreeca) 37
Oya187 32
sas.Sziky 28
Movie 27
zelot 26
Mong 20
Terrorterran 10
Noble 10
ajuk12(nOOB) 9
Dota 2
singsing4125
Gorgc3595
qojqva2423
Dendi975
syndereN234
XcaliburYe198
Counter-Strike
allub178
oskar101
Heroes of the Storm
Khaldor379
Liquid`Hasu53
Other Games
FrodaN2802
B2W.Neo1176
Fuzer 304
XaKoH 161
KnowMe104
Mew2King29
Beastyqt12
Organizations
Other Games
EGCTV333
StarCraft: Brood War
lovetv 10
Kim Chul Min (afreeca) 9
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Adnapsc2 11
• HeavenSC 5
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis2794
Other Games
• Scarra1174
Upcoming Events
IPSL
4h 59m
Sziky vs JDConan
BSL 21
4h 59m
Tech vs Cross
Bonyth vs eOnzErG
Replay Cast
17h 59m
Wardi Open
20h 59m
Monday Night Weeklies
1d 1h
Sparkling Tuna Cup
1d 18h
Replay Cast
3 days
The PondCast
3 days
CranKy Ducklings
5 days
SC Evo League
5 days
[ Show More ]
BSL 21
6 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Acropolis #4 - TS3
RSL Revival: Season 3
Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
Slon Tour Season 2
WardiTV 2025
META Madness #9
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

CSL 2025 WINTER (S19)
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
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.