Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: while loop problem
Date: Sat, 8 Mar 2008 00:14:03 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 51
Message-ID: <fqslob$jgb$1@fred.mathworks.com>
References: <fqsk9e$73s$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1204935243 19979 172.30.248.37 (8 Mar 2008 00:14:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 8 Mar 2008 00:14:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:456059



"Steve ":
<SNIP obviously a CSSM newbie...

> while Kmax_net(i)<Kc
>     i=i+1;
>     % calculate crack propagation
>     Kmax_app(i)=1.12*Smax*sqrt(pi*a(i-1));
>     Kmin_app(i)=1.12*Smin*sqrt(pi*a(i-1));
>     Kresidual(i)=interp1(KresTable(:,1),KresTable(:,2),a
(i-
> 1));
>     Kmax_net(i)=Kmax_app(i)+Kresidual(i);
>     if Kmax_net(i)<0
>         Kmax_net(i)=0;
>     else
>         Kmax_net(i)=Kmax_net(i);
>     end
>     Kmin_net(i)=Kmin_app(i)+Kresidual(i);
>     if Kmin_net(i)<0
>         Kmin_net(i)=0;
>     else
>         Kmin_net(i)=Kmin_net(i);
>     end
>     dKnet(i)=Kmax_net(i)-Kmin_net(i);
>     Rnet(i)=Kmin_net(i)/Kmax_net(i);
>     da(i)=C*(dKnet(i))^M/((1-Rnet(i))*Kc-dKnet(i));
>     a(i)=a(i-1)+da(i);
> end

this is NOT the way to ask for help in this lovely NG...

1) nobody will ever be able to guess the contents of your 
(fancily - or shall we call it: tediously - christened) 
variables...
2) your snipplet is badly wrapped, which means: CSSMers 
cannot easily copy/paste it for further examinations... and 
NOBODY has/will ever spend the time to re-type your 
particular stuff into an m-scriplet as all of us have to 
finish some nobel-prize winning nature submissions and - by 
nature - are not REALLY interested in your problem...

conclusion:
come up with the most frugal(!) code skeleton that 
reproduces your problem/error - and (most likely) thou 
shallst (sic!) be enlightened...
otherwise, all you get is guess-work - and corrections on 
your part - and more guess-work - and people getting 
(slightly) annoyed...

sorry...
us