• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 03:00
CET 09:00
KST 17:00
  • 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
ByuL: The Forgotten Master of ZvT29Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Team Liquid Map Contest - Preparation Notice6Weekly Cups (Feb 23-Mar 1): herO doubles, 2v2 bonanza1Weekly Cups (Feb 16-22): MaxPax doubles0Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0258
StarCraft 2
General
https://www.facebook.com/BackRestore.USA/ How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Vitality disbanding their sc2-team Team Liquid Map Contest - Preparation Notice ByuL: The Forgotten Master of ZvT
Tourneys
RSL Season 4 announced for March-April Sparkling Tuna Cup - Weekly Open Tournament $5,000 WardiTV Winter Championship 2026 Sea Duckling Open (Global, Bronze-Diamond) PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar)
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 515 Together Forever Mutation # 514 Ulnar New Year Mutation # 513 Attrition Warfare
Brood War
General
Gypsy to Korea BSL 22 Map Contest — Submissions OPEN to March 10 Flash's ASL S21 & Future Plans Announcement BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion
Tourneys
ASL Season 21 Qualifiers March 7-8 [Megathread] Daily Proleagues [BSL22] Open Qualifier #1 - Sunday 21:00 CET Small VOD Thread 2.0
Strategy
Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates Simple Questions, Simple Answers Zealot bombing is no longer popular?
Other Games
General Games
Path of Exile PC Games Sales Thread Nintendo Switch Thread Stormgate/Frost Giant Megathread Battle Aces/David Kim RTS Megathread
Dota 2
Official 'what is Dota anymore' discussion The Story of Wings Gaming
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 Vanilla Mini Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine YouTube Thread UK Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Gaming-Related Deaths
TrAiDoS
ONE GREAT AMERICAN MARINE…
XenOsky
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2120 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 1m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mcanning 156
SortOf 120
Livibee 11
StarCraft: Brood War
Sea 34687
Britney 23523
Bisu 9882
Flash 1189
ToSsGirL 263
Dewaltoss 165
PianO 147
Terrorterran 15
Dota 2
XaKoH 490
NeuroSwarm131
League of Legends
JimRising 643
Counter-Strike
Stewie2K1270
m0e_tv436
Super Smash Bros
Mew2King121
Other Games
C9.Mang0330
Fuzer 155
ToD52
Organizations
StarCraft: Brood War
Afreeca ASL 3847
Dota 2
PGL Dota 2 - Main Stream1630
StarCraft: Brood War
UltimateBattle 283
Dota 2
PGL Dota 2 - Secondary Stream186
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
CasterMuse 0
sctven
[ Show 13 non-featured ]
StarCraft 2
• practicex 31
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1784
• Stunt524
Upcoming Events
CranKy Ducklings
2h 1m
RSL Revival
2h 1m
Reynor vs Zoun
herO vs sOs
WardiTV Winter Champion…
4h 1m
Classic vs Rogue
Solar vs Gerald
Bunny vs Nicoract
ByuN vs Zoun
herO vs Clem
MaxPax vs Cure
AI Arena Tournament
12h 1m
Patches Events
15h 1m
Replay Cast
16h 1m
Sparkling Tuna Cup
1d 2h
RSL Revival
1d 2h
Classic vs TriGGeR
Cure vs Cham
WardiTV Winter Champion…
1d 4h
OSC
1d 4h
[ Show More ]
BSL
1d 12h
Replay Cast
1d 16h
Replay Cast
2 days
Monday Night Weeklies
2 days
OSC
2 days
Replay Cast
4 days
The PondCast
5 days
Replay Cast
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-03-05
PiG Sty Festival 7.0
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
Spring Cup 2026
ASL Season 21: Qualifier #1
RSL Revival: Season 4
WardiTV Winter 2026
Nations Cup 2026
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

ASL Season 21: Qualifier #2
ASL Season 21
Acropolis #4 - TS6
Acropolis #4
IPSL Spring 2026
CSLAN 4
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
NationLESS Cup
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
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.