




| Blogs > clazziquai |
|
clazziquai
6685 Posts
![]() ![]() ![]() ![]() ![]() | ||
|
micronesia
United States24746 Posts
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?) | ||
|
Darth_Ihsahn
Mexico138 Posts
Isn't necessary (Actually it's wrong). Just counter++ | ||
|
overpool
United States191 Posts
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.) | ||
|
JDPingpong
United States57 Posts
*edit* The | symbol in the while statement means or. | ||
|
clazziquai
6685 Posts
How about #1 anyone? That one is still weird I can't get anything to work -_- | ||
|
clazziquai
6685 Posts
| ||
|
JDPingpong
United States57 Posts
*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
Canada561 Posts
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. | ||
|
Raithed
China7078 Posts
| ||
|
clazziquai
6685 Posts
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 | ||
| ||
[ Submit Event ] |
StarCraft 2 IndyStarCraft StarCraft: Brood WarRotterdaM Lowko522 SteadfastSC Liquid`VortiX BRAT_OK MindelVK DivinesiaTV Britney Dota 2Rain Bisu Stork Horang2 Shuttle Larva Mini firebathero Hyun [ Show more ] Counter-Strike Other Games Organizations
StarCraft 2 • poizon28 StarCraft: Brood War• AfreecaTV YouTube • intothetv • Kozan • IndyKCrew • LaughNgamezSOOP • Migwel • sooper7s Dota 2 League of Legends Other Games |
|
The PiG Daily
SHIN vs ByuN
Reynor vs Classic
TBD vs herO
Maru vs SHIN
TBD vs Classic
CranKy Ducklings
WardiTV 2025
Reynor vs MaxPax
SHIN vs TBD
Solar vs herO
Classic vs TBD
SC Evo League
Ladder Legends
BSL 21
Sziky vs Dewalt
eOnzErG vs Cross
Sparkling Tuna Cup
Ladder Legends
BSL 21
StRyKeR vs TBD
Bonyth vs TBD
Replay Cast
[ Show More ] Wardi Open
Monday Night Weeklies
WardiTV Invitational
Replay Cast
WardiTV Invitational
ByuN vs Solar
Clem vs Classic
Cure vs herO
Reynor vs MaxPax
|
|
|