• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 13:36
CET 19:36
KST 03: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
ByuL: The Forgotten Master of ZvT14Behind the Blue - Team Liquid History Book16Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0224LiuLi Cup: 2025 Grand Finals (Feb 10-16)46Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2Nexon's StarCraft game could be FPS, led by UMS maker15
StarCraft 2
General
ByuL: The Forgotten Master of ZvT How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Weekly Cups (Feb 9-15): herO doubles up SpeCial on The Tasteless Podcast Nexon's StarCraft game could be FPS, led by UMS maker
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) LiuLi Cup: 2025 Grand Finals (Feb 10-16) Master Swan Open (Global Bronze-Master 2) WardiTV Team League Season 10
Strategy
Custom Maps
Map Editor closed ? [A] Starcraft Sound Mod
External Content
Mutation # 513 Attrition Warfare The PondCast: SC2 News & Results Mutation # 512 Overclocked Mutation # 511 Temple of Rebirth
Brood War
General
TvZ is the most complete match up BGH Auto Balance -> http://bghmmr.eu/ Ladder maps - how we can make blizz update them? Gypsy to Korea Brood War inspired Terran vs Zerg cinematic – feed
Tourneys
Escore Tournament StarCraft Season 1 [Megathread] Daily Proleagues Small VOD Thread 2.0 KCM Race Survival 2026 Season 1
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates Zealot bombing is no longer popular? Current Meta
Other Games
General Games
Diablo 2 thread ZeroSpace Megathread Nintendo Switch Thread Path of Exile Battle Aces/David Kim RTS Megathread
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
TL Mafia Community Thread Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Ask and answer stupid questions here! Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
The Search For Meaning in Vi…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2602 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 States24753 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
Next event in 5h 24m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Harstem 352
elazer 212
ProTech157
UpATreeSC 108
BRAT_OK 85
OGKoka 64
MindelVK 28
StarCraft: Brood War
Calm 2123
Horang2 593
firebathero 237
Shuttle 218
BeSt 142
ggaemo 121
Dewaltoss 95
PianO 43
JulyZerg 16
League of Legends
C9.Mang0136
Counter-Strike
fl0m2385
pashabiceps2196
Foxcn777
adren_tv64
Heroes of the Storm
Liquid`Hasu199
Khaldor148
Other Games
Grubby3073
singsing2143
FrodaN2101
Beastyqt898
ceh9564
Hui .154
KnowMe147
RotterdaM132
Trikslyr65
QueenE63
Livibee6
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• IndyKCrew
• sooper7s
• Migwel
• AfreecaTV YouTube
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• FirePhoenix11
• Michael_bg 6
• blackmanpl 1
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV234
League of Legends
• Nemesis6331
• TFBlade929
• Shiphtur254
Other Games
• imaqtpie727
Upcoming Events
Replay Cast
5h 24m
PiG Sty Festival
14h 24m
Maru vs Bunny
Classic vs SHIN
The PondCast
15h 24m
KCM Race Survival
15h 24m
WardiTV Winter Champion…
17h 24m
OSC
17h 24m
Replay Cast
1d 5h
PiG Sty Festival
1d 14h
Clem vs Percival
Zoun vs Solar
Escore
1d 15h
Epic.LAN
1d 17h
[ Show More ]
Replay Cast
2 days
PiG Sty Festival
2 days
herO vs NightMare
Reynor vs Cure
CranKy Ducklings
2 days
Epic.LAN
2 days
Replay Cast
3 days
PiG Sty Festival
3 days
Serral vs YoungYakov
ByuN vs ShoWTimE
Sparkling Tuna Cup
3 days
Replay Cast
4 days
Replay Cast
4 days
Wardi Open
4 days
Monday Night Weeklies
4 days
Replay Cast
5 days
WardiTV Winter Champion…
5 days
WardiTV Winter Champion…
6 days
Liquipedia Results

Completed

C-League Week 31
LiuLi Cup: 2025 Grand Finals
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
WardiTV Winter 2026
Nations Cup 2026
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025

Upcoming

Escore Tournament S1: King of Kings
[S:21] ASL SEASON OPEN 1st Round
[S:21] ASL SEASON OPEN 1st Round Qualifier
Jeongseon Sooper Cup
Spring Cup 2026: China & Korea Invitational
[S:21] ASL SEASON OPEN 2nd Round
[S:21] ASL SEASON OPEN 2nd Round Qualifier
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
PiG Sty Festival 7.0
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
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.