help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to print the values of the variables in a loop?


From: Arnau Mir Torres
Subject: how to print the values of the variables in a loop?
Date: Tue, 14 May 2002 13:21:39 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417

Hello.
I have an m file called file.m with the following:

for i = 1:10
tf = 1000.*i;
temps(i)=tf;
ll = 5.*10^(-4);
[z, ier, nfun, err] = quad ("g", 0, ll, [1e-12,1e-14]) ;
jph (i) = z;
error (i) = err;
nnfun (i) = nfun;
iier (i) = ier;
printf("i= %d, jph(%d)=%1.15e, error(%d)=%1.5e, nnfun(%d)=%1.5e, iier(%d)=%1.5e\n",i,i,jph(i),i,error(i),i,nnfun(i),i,iier(i));
endfor

If I do
octave
and next I do
file
then octave executes all the loop and at the end, it prints the values of i, jph, etc.
My question is:
how can I do to print the values of the variables while octave is in the loop. That is, I want to know the value of jph(2) for example when octave even doesn't arrive at the end of the loop.

Thanks in advance,

Arnau.

--
Arnau Mir Torres
Departament de Matem?tiques i Inform?tica
Universitat de les Illes Balears
Edifici A. Turmeda
Ctra. de Valldemossa, km. 7,5
E-07071 Palma de Mallorca
Spain
Phone: 00 34 971 172561
Fax: 00 34 971 173003
e-mail: address@hidden
http://dmi.uib.es/people/dmiamt0




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]