• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 01:08
CET 07:08
KST 15:08
  • 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
RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13
Community News
Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge1[TLMC] Fall/Winter 2025 Ladder Map Rotation13Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45
StarCraft 2
General
RotterdaM "Serral is the GOAT, and it's not close" Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge [TLMC] Fall/Winter 2025 Ladder Map Rotation Mech is the composition that needs teleportation t RSL Season 3 - RO16 Groups C & D Preview
Tourneys
2025 RSL Offline Finals Dates + Ticket Sales! $5,000+ WardiTV 2025 Championship RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle What happened to TvZ on Retro? BGH Auto Balance -> http://bghmmr.eu/ SnOw's ASL S20 Finals Review BW General Discussion
Tourneys
[BSL21] GosuLeague T1 Ro16 - Tue & Thu 22:00 CET [Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET
Strategy
Current Meta How to stay on top of macro? PvZ map balance Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread Beyond All Reason Clair Obscur - Expedition 33 Should offensive tower rushing be viable in RTS games? Path of Exile
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 SPIRED by.ASL Mafia {211640}
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread The Games Industry And ATVI Things Aren’t Peaceful in Palestine About SC2SEA.COM
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2063 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 States24741 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
ChoboTeamLeague
01:00
S33 Finals FxB vs Chumpions
Discussion
Replay Cast
23:00
WardiTV Mondays #60
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
yabsab 59
Icarus 5
Dota 2
monkeys_forever752
League of Legends
JimRising 659
Counter-Strike
m0e_tv292
Coldzera 205
Other Games
summit1g12598
C9.Mang0306
NeuroSwarm57
Trikslyr33
Organizations
Other Games
gamesdonequick1009
BasetradeTV15
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• Hupsaiya 147
• practicex 21
• Kozan
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Rush1266
• Lourlo997
• Stunt493
Counter-Strike
• Shiphtur186
Other Games
• Scarra1601
Upcoming Events
WardiTV Korean Royale
5h 52m
BSL: GosuLeague
14h 52m
PiGosaur Cup
18h 52m
The PondCast
1d 3h
Replay Cast
1d 16h
RSL Revival
2 days
herO vs Zoun
Classic vs Reynor
Maru vs SHIN
MaxPax vs TriGGeR
BSL: GosuLeague
2 days
RSL Revival
3 days
WardiTV Korean Royale
3 days
RSL Revival
4 days
[ Show More ]
WardiTV Korean Royale
4 days
IPSL
4 days
Julia vs Artosis
JDConan vs DragOn
RSL Revival
5 days
Wardi Open
5 days
IPSL
5 days
StRyKeR vs OldBoy
Sziky vs Tarson
Replay Cast
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-11-14
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
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 © 2025 TLnet. All Rights Reserved.