• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:23
CEST 22:23
KST 05:23
  • 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] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy18ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book20
Community News
$5,000 WardiTV TLMC tournament - Presented by Monster Energy1GSL CK: More events planned pending crowdfunding0Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win0[BSL22] RO32 Group Stage4Weekly Cups (March 23-29): herO takes triple6
StarCraft 2
General
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win Rongyi Cup S3 - Preview & Info Team Liquid Map Contest #22 - Presented by Monster Energy What mix of new & old maps do you want in the next ladder pool? (SC2)
Tourneys
RSL Season 4 announced for March-April $5,000 WardiTV TLMC tournament - Presented by Monster Energy Sea Duckling Open (Global, Bronze-Diamond) GSL CK: More events planned pending crowdfunding Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power Mutation # 518 Radiation Zone
Brood War
General
so ive been playing broodwar for a week straight. ASL21 General Discussion Pros React To: JaeDong vs Queen [BSL22] RO32 Group Stage Gypsy to Korea
Tourneys
[BSL22] RO32 Group A - Saturday 21:00 CET 🌍 Weekly Foreign Showmatches [Megathread] Daily Proleagues [ASL21] Ro24 Group F
Strategy
Muta micro map competition Fighting Spirit mining rates What's the deal with APM & what's its true value Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread Starcraft Tabletop Miniature Game General RTS Discussion Thread Nintendo Switch Thread Darkest Dungeon
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
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
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread Russo-Ukrainian War Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread General nutrition recommendations
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Loot Boxes—Emotions, And Why…
TrAiDoS
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
ASL S21 English Commentary…
namkraft
Electronics
mantequilla
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1345 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 States24768 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 3h 37m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 569
elazer 181
UpATreeSC 126
ProTech123
JuggernautJason45
StarCraft: Brood War
Calm 1879
Larva 288
Rush 148
hero 147
ggaemo 131
Dewaltoss 95
sorry 50
910 13
Sexy 12
Terrorterran 11
Dota 2
BananaSlamJamma230
League of Legends
JimRising 224
Counter-Strike
pashabiceps2294
Super Smash Bros
Mew2King80
Heroes of the Storm
Liquid`Hasu376
Other Games
summit1g11621
Grubby3140
FrodaN1433
B2W.Neo679
C9.Mang0232
ArmadaUGS138
hungrybox134
Hui .105
Sick85
ZombieGrub82
KnowMe54
Organizations
Other Games
BasetradeTV58
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• Adnapsc2 12
• Reevou 5
• Kozan
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• Azhi_Dahaki36
• Michael_bg 1
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• Noizen84
• lizZardDota267
Other Games
• imaqtpie1336
• Scarra495
• Shiphtur201
Upcoming Events
Replay Cast
3h 37m
The PondCast
13h 37m
CranKy Ducklings
1d 3h
WardiTV Team League
1d 14h
Replay Cast
2 days
CranKy Ducklings
2 days
WardiTV Team League
2 days
uThermal 2v2 Circuit
2 days
BSL
2 days
Sparkling Tuna Cup
3 days
[ Show More ]
WardiTV Team League
3 days
OSC
3 days
BSL
3 days
Replay Cast
4 days
Replay Cast
4 days
Wardi Open
4 days
GSL
5 days
Replay Cast
6 days
Kung Fu Cup
6 days
Liquipedia Results

Completed

CSL Elite League 2026
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
StarCraft2 Community Team League 2026 Spring
Nations Cup 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
BLAST Bounty Winter 2026

Upcoming

Escore Tournament S2: W2
IPSL Spring 2026
Escore Tournament S2: W3
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
RSL Revival: Season 5
WardiTV TLMC #16
IEM Cologne Major 2026
Stake Ranked Episode 2
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
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.