Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Trouble with the while loop

$
0
0
Still a Novice at matlab, trying to figure out what's wrong with my while loop everytime I run it, matlab crashes.
Here's my code:
omegax=0;omegay=0;omegaz=1;x=0;y=0;z=1; rand(1000);
omega=[omegax,omegay,omegaz];v=[x,y,z];w=1;alpha=0.9;
        while 0<=z && z<=5;
            r=-log(rand);
            v=v+r*omega;
        end

Viewing all articles
Browse latest Browse all 19628

Trending Articles