From: Aditya jayanthi on 19 Jun 2010 17:36 I need help in plotting my data, I have two plots one for exact and numerical values of a function and the other for error, In my program i want to plot exact and numerical values in first plot and error on second plot and It completes one iteration , After it comes for the second iteration ,I need the same to happen again, I am trying hold on and hold off ,Its not wrking, here is my part of code n=0; for xi= delxi:delxi:ximax for i=1:npteta FE(i)=(erf((1-eta(i))/(2*sqrt(xi)))+erf((1+eta(i))/(2*sqrt(xi))))*0.5; end pn(1) = 1; qn(1) = 0; for i = 2:npteta-1 A(i) = (1.0/(deleta^2))-(delta/(2.0*eta(i)*deleta)); B(i) = -(2.0/(deleta^2))-(1.0/delxi); C(i) = (1.0/(deleta^2))+(delta/(2.0*eta(i)*deleta)); D(i) = -F(i)/delxi; pn(i) = -C(i)/(A(i)*pn(i-1)+B(i)); qn(i) = (D(i)-A(i)*qn(i-1))/(A(i)*pn(i-1)+B(i)); end F(npteta) = 0; for i = npteta-1:-1:1 F(i)=pn(i)*F(i+1)+qn(i); end for i=1:npteta e(i)=FE(i)-F(i); end n=n+1; if mod(n,1000)==0.0 plot(eta,F,'LineWidth',2); hold on; plot(eta,FE,'LineWidth',2); plot(eta,e,'LineWidth',2); end
From: sscnekro on 20 Jun 2010 15:50 Sorry, didn't have time to read your code properly. But maybe you need to create two figures, hm? Otherwise explain again, briefly. % a figure f1 = figure; plot(eta,F,...); hold on plot(eta,FE,...); % another figure f2 = figure; plot(eta,e,...);
|
Pages: 1 Prev: Error while trying to use cwt.m in wavelet toolbox 2.2 Next: mcc and own icon |