• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 15:45
CEST 21:45
KST 04:45
  • 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] Finals Preview: Two Legacies18Code S Season 2 (2026) - RO12 Preview2herO wins GSL Code S Season 1 (2026)5Code S Season 1 (2026) - RO4 & Finals Preview5[ASL21] Ro4 Preview: On Course12
Community News
Weekly Cups (May 11-17): Classic wins double0Code S Season 1 (2026) - RO8 Results2Weekly Cups (May 4-10): Clem, MaxPax, herO win1Maestros of The Game 2 announcement and schedule !18Weekly Cups (April 27-May 4): Clem takes triple0
StarCraft 2
General
herO wins GSL Code S Season 1 (2026) Code S Season 2 (2026) - RO12 Preview Weekly Cups (May 11-17): Classic wins double Code S Season 1 (2026) - RO4 & Finals Preview Team Liquid Map Contest #22 - The Finalists
Tourneys
Crank Gathers Season 4: BW vs SC2 Team League GSL Code S Season 2 (2026) GSL Code S Season 1 (2026) Sparkling Tuna Cup - Weekly Open Tournament Maestros of The Game 2 announcement and schedule !
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players
External Content
Mutation # 527 Hell Train The PondCast: SC2 News & Results Mutation # 526 Rubber and Glue Mutation # 525 Wheel of Misfortune
Brood War
General
25 Years Since Brood War Patch 1.08 (Spoiler) ASL21 Winner's Interview vespene.gg — BW replays in browser [ASL21] Finals Preview: Two Legacies UA StarCraft: Mawin (T) vs hanniGan (P) Showmatch
Tourneys
[ASL21] Grand Finals Escore Tournament StarCraft Season 2 [Megathread] Daily Proleagues Small VOD Thread 2.0
Strategy
Any training maps people recommend? Muta micro map competition [G] Hydra ZvZ: An Introduction Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Dawn of War IV ZeroSpace Megathread Warcraft III: The Frozen Throne
Dota 2
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
Russo-Ukrainian War Thread Trading/Investing Thread US Politics Mega-thread European Politico-economics QA Mega-thread YouTube Thread
Fan Clubs
The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread McBoner: A hockey love story TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
streaming software Strange computer issues (software)
TL Community
The Automated Ban List
Blogs
Esports Organizations: Raisi…
TrAiDoS
Why RTS gamers make better f…
gosubay
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1488 users

MATLAB experts needed

Blogs > clazziquai
Post a Reply
clazziquai
Profile Blog Joined October 2007
6685 Posts
Last Edited: 2008-10-27 15:08:46
October 27 2008 02:19 GMT
#1
Ok so I basically finished the problem set with the exception of the last two questions, aka the hardest ones TT

#1 Sea.Really Fan / #1 Nesh Fan / Terran Forever~
micronesia
Profile Blog Joined July 2006
United States24775 Posts
Last Edited: 2008-10-27 02:26:43
October 27 2008 02:25 GMT
#2
1: The outer loop cycles through each of the members of the matrix. The inner loop compares the member highlighted currently by the outer loop in each direction, with the condition that it only does it if the direction is on the matrix (like you can't look up from the top row).

2:
x=0
counter=0
While (x<.8 and x>.85)
{
<x=rand(1)>
If x>.8 or x<.85 then counter++
}
Report

I don't know the exact syntax, but something like that?

edit: for 2 be careful of if they are considering .8 and .85 as valid answers or not (inclusive or exclusive conditions?)
ModeratorThere are animal crackers for people and there are people crackers for animals.
Darth_Ihsahn
Profile Joined June 2007
Mexico138 Posts
Last Edited: 2008-10-27 02:52:41
October 27 2008 02:51 GMT
#3
If x>.8 or x<.85 then counter++

Isn't necessary (Actually it's wrong). Just counter++
What does not kill you makes you stronger.
overpool
Profile Joined April 2008
United States191 Posts
Last Edited: 2008-10-27 03:09:15
October 27 2008 03:08 GMT
#4
On October 27 2008 11:25 micronesia wrote:
1: The outer loop cycles through each of the members of the matrix. The inner loop compares the member highlighted currently by the outer loop in each direction, with the condition that it only does it if the direction is on the matrix (like you can't look up from the top row).

Good answer, but it's easier to just choose two arbitrary directions to compare in (like right and down), and then only test (length-1) rows and (height-1) columns. (Note: I've never used MATLAB so I'm making assumptions about its capabilities.)
yay i love tl events
JDPingpong
Profile Joined June 2008
United States57 Posts
Last Edited: 2008-10-30 18:30:11
October 27 2008 05:29 GMT
#5
here is the correct syntax for the 2nd question.


*edit*

The | symbol in the while statement means or.
clazziquai
Profile Blog Joined October 2007
6685 Posts
Last Edited: 2008-10-27 21:05:30
October 27 2008 06:49 GMT
#6

How about #1 anyone? That one is still weird I can't get anything to work -_-
#1 Sea.Really Fan / #1 Nesh Fan / Terran Forever~
clazziquai
Profile Blog Joined October 2007
6685 Posts
Last Edited: 2008-10-27 15:09:07
October 27 2008 07:14 GMT
#7
thanks!
#1 Sea.Really Fan / #1 Nesh Fan / Terran Forever~
JDPingpong
Profile Joined June 2008
United States57 Posts
Last Edited: 2008-10-30 18:30:34
October 27 2008 14:38 GMT
#8
Its pretty crude, but it gets the job done.

*edit*

This is a great problem when starting out with MATLAB. It teaches you how to index stuff. When doing the for loop, you need to store each value of the tuition into cell of a matrix. I don't have much time to explain, i'm on class break, but take a look over it and see if you can get comfortable with the indexing in the for loop. Its a skill you have to have when using MATLAB. If you are confused anywhere, just ask. I'll check this thread. As for problem 1 in the OP, i'll take a look at it later tonight. It'll take a little more time to figure out, but i think i can help.
Chromyne
Profile Joined January 2008
Canada561 Posts
October 27 2008 18:42 GMT
#9
On October 27 2008 11:19 clazziquai wrote:
Ok so I basically finished the problem set with the exception of the last two questions, aka the hardest ones TT


That's unfortunate, I would have helped but I had to do a pre-lab and study for a midterm. Hope it' doesn't mar your grade too much.
Soli Deo gloria.
Raithed
Profile Blog Joined May 2007
China7078 Posts
October 27 2008 18:48 GMT
#10
haha.
clazziquai
Profile Blog Joined October 2007
6685 Posts
October 27 2008 20:57 GMT
#11
On October 28 2008 03:42 Chromyne wrote:
Show nested quote +
On October 27 2008 11:19 clazziquai wrote:
Ok so I basically finished the problem set with the exception of the last two questions, aka the hardest ones TT


That's unfortunate, I would have helped but I had to do a pre-lab and study for a midterm. Hope it' doesn't mar your grade too much.


The whole assignment is out of 1 point, so it's not that big of a deal :D
#1 Sea.Really Fan / #1 Nesh Fan / Terran Forever~
Please log in or register to reply.
Live Events Refresh
Patches Events
19:30
Patches' Patch Clash #7
Liquipedia
BSL
19:00
RO8 - Day 4
DragOn vs Dewalt
TerrOr vs OyAji
ZZZero.O332
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
JuggernautJason126
BRAT_OK 90
ProTech89
EmSc Tv 26
StarCraft: Brood War
Britney 35424
Mini 434
ZZZero.O 332
ggaemo 169
firebathero 130
Zeus 59
910 23
Rock 23
NaDa 12
IntoTheRainbow 11
Dota 2
Gorgc9328
Heroes of the Storm
Liquid`Hasu331
Other Games
FrodaN4745
Grubby3036
Liquid`RaSZi2236
singsing1794
fl0m1342
B2W.Neo703
mouzStarbuck353
KnowMe289
Hui .179
RotterdaM120
Fuzer 107
UpATreeSC102
QueenE48
Organizations
Other Games
gamesdonequick948
StarCraft 2
angryscii 31
Other Games
BasetradeTV26
StarCraft 2
EmSc Tv 26
EmSc2Tv 26
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 20 non-featured ]
StarCraft 2
• Hupsaiya 24
• Reevou 15
• Response 2
• sooper7s
• AfreecaTV YouTube
• intothetv
• Kozan
• Migwel
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• 80smullet 16
• Michael_bg 8
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 1431
• lizZardDota259
Other Games
• imaqtpie1450
• WagamamaTV350
• Shiphtur310
Upcoming Events
OSC
4h 15m
Universe Titan Cup
15h 15m
Rogue vs Percival
Wardi Open
16h 15m
Monday Night Weeklies
20h 15m
Replay Cast
1d 4h
Kung Fu Cup
1d 15h
GSL
2 days
herO vs Classic
Cure vs Clem
uThermal 2v2 Circuit
2 days
Replay Cast
3 days
GSL
3 days
Maru vs SHIN
Zoun vs Rogue
[ Show More ]
WardiTV Spring Champion…
3 days
SKillous vs Strange
Lambo vs Strange
Ryung vs Strange
Lambo vs Ryung
Ryung vs SKillous
Lambo vs SKillous
Replay Cast
4 days
Maestros of the Game
4 days
Replay Cast
5 days
RSL Revival
5 days
TBD vs SHIN
TBD vs Rogue
IPSL
5 days
ZZZero vs WorsT
Julia vs eOnzErG
Replay Cast
6 days
RSL Revival
6 days
IPSL
6 days
Dragon vs Artosis
dxtr13 vs Hawk
BSL
6 days
Liquipedia Results

Completed

Escore Tournament S2: W8
2026 GSL S1
Heroes Pulsing #1

Ongoing

2026 KK StarCraft Pro League
BSL Season 22
IPSL Spring 2026
KCM Race Survival 2026 Season 2
KK 2v2 League Season 1
BSL 22 Non-Korean Championship
YSL S3
Acropolis #4
SCTL 2026 Spring
WardiTV Spring 2026
2026 GSL S2
RSL Revival: Season 5
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals

Upcoming

CSCL: Masked Kings S4
Escore Tournament S2: King of Kings
CSLAN 4
Blizzard Classic Cup 2026
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
Bounty Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
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.