• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:36
CEST 14:36
KST 21:36
  • 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
[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists14[ASL21] Ro16 Preview Pt1: Fresh Flow9[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0
Community News
2026 GSL Season 1 Qualifiers12Maestros of the Game 2 announced52026 GSL Tour plans announced14Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid23
StarCraft 2
General
MaNa leaves Team Liquid Maestros of the Game 2 announced 2026 GSL Tour plans announced Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Team Liquid Map Contest #22 - The Finalists
Tourneys
2026 GSL Season 1 Qualifiers GSL CK: More events planned pending crowdfunding RSL Revival: Season 5 - Qualifiers and Main Event Sparkling Tuna Cup - Weekly Open Tournament Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 522 Flip My Base The PondCast: SC2 News & Results Mutation # 521 Memorable Boss Mutation # 520 Moving Fees
Brood War
General
Data needed ASL21 Strategy, Pimpest Plays Discussions [ASL21] Ro16 Preview Pt2: All Star BGH Auto Balance -> http://bghmmr.eu/ RepMastered™: replay sharing and analyzer site
Tourneys
[ASL21] Ro16 Group D [ASL21] Ro16 Group C [ASL21] Ro16 Group B [Megathread] Daily Proleagues
Strategy
Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend? Fighting Spirit mining rates
Other Games
General Games
Dawn of War IV Starcraft Tabletop Miniature Game Nintendo Switch Thread General RTS Discussion Thread Battle Aces/David Kim RTS Megathread
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
Formula 1 Discussion 2024 - 2026 Football Thread McBoner: A hockey love story Cricket [SPORT]
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1664 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 Map Contest Tou…
12:30
Playoffs Day 1
herO vs Classic
SHIN vs Cure
Solar vs Percival
Liquipedia
Afreeca Starleague
10:00
Ro16 Group D
Barracks vs Leta
Royal vs Light
Afreeca ASL 14791
StarCastTV_EN344
Liquipedia
GSL
08:00
2026 Season 1: Qualifiers
herO vs Rogue
Cure vs TriGGeRLIVE!
SHIN vs Bunny
IntoTheiNu 421
CranKy Ducklings SOOP225
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko409
TKL 164
Rex 84
StarCraft: Brood War
Britney 32588
Calm 12587
Sea 6875
Jaedong 5303
BeSt 1410
Rush 1018
Leta 901
Horang2 796
Hyuk 623
Pusan 428
[ Show more ]
Mind 359
Zeus 254
JYJ 139
ToSsGirL 113
Larva 102
ggaemo 93
Sharp 86
[sc1f]eonzerg 65
Sexy 60
Noble 30
Shine 29
Killer 26
Bale 22
Icarus 20
SilentControl 16
Movie 15
Sacsri 12
GoRush 11
JulyZerg 10
Terrorterran 6
eros_byul 0
Dota 2
Gorgc5315
League of Legends
Reynor69
Counter-Strike
zeus1099
shoxiejesuss816
x6flipin605
edward296
markeloff136
Super Smash Bros
Mew2King127
Heroes of the Storm
Trikslyr130
Other Games
singsing2048
B2W.Neo408
hiko367
Happy354
Mlord335
crisheroes275
XaKoH 181
Liquid`LucifroN79
QueenE53
Organizations
Dota 2
PGL Dota 2 - Main Stream11860
PGL Dota 2 - Secondary Stream2035
StarCraft 2
WardiTV315
StarCraft: Brood War
UltimateBattle 269
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• StrangeGG 53
• 3DClanTV 23
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• TFBlade1490
Upcoming Events
RSL Revival
21h 24m
Replay Cast
1d 11h
The PondCast
1d 21h
KCM Race Survival
1d 21h
WardiTV Map Contest Tou…
1d 22h
Gerald vs TBD
Clem vs TBD
ByuN vs TBD
Rogue vs MaxPax
ShoWTimE vs TBD
CranKy Ducklings
2 days
Escore
2 days
RSL Revival
3 days
WardiTV Map Contest Tou…
3 days
Universe Titan Cup
3 days
Rogue vs Percival
[ Show More ]
Ladder Legends
4 days
uThermal 2v2 Circuit
4 days
BSL
4 days
Sparkling Tuna Cup
4 days
WardiTV Map Contest Tou…
4 days
Ladder Legends
5 days
BSL
5 days
Replay Cast
5 days
Replay Cast
5 days
Wardi Open
5 days
Monday Night Weeklies
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-04-20
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
StarCraft2 Community Team League 2026 Spring
WardiTV TLMC #16
Nations Cup 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026

Upcoming

Escore Tournament S2: W4
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
RSL Revival: Season 5
2026 GSL S1
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 2026
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 © 2026 TLnet. All Rights Reserved.