Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Programming problem
Replies: 3   Last Post: Mar 4, 2013 2:49 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,944
Registered: 12/7/04
Re: Programming problem
Posted: Mar 4, 2013 10:11 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"Milos Milenkovic" <m.milenkovic@mathworks.com> wrote in message
news:kh1pbg$3ph$1@newscl01ah.mathworks.com...
> Dear, I have problem with replacing goto command in Matlab.
> The code is something like this:
> 1 generator of a random matrix B1=-0.1+(0.1+0.1).*rand(4,4);
> 2 set of matlab commands ->
> Ke=wn1(B0,B1,K0,K1); %wn je kod za racunanje kovarijanse belog suma
> [Delta1, Error1]=d1(B1,K1,Ke);
> [Delta0, Error0]=d2(B0,B1,K0,Delta1,Ke);
> 3 if (condition statement) ->
> if (Delta0(i,j)<2) && (Delta1(i,j)<2)
> [B0,B1]= up(B0,B1, Delta0, Delta1)
> 4 elseif goto 1 (generator again)
> So, how to close this set of steps?


satisfied = false;
while ~satisfied
% step 1
% step 2
% step 3
% if delta condition satisfied
satisfied = true;
% else
% end
end

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.