Execute the same calculus to different data files
Wolfgang Schechinger
hubahopp at gmx.de
Tue Aug 5 11:21:31 CDT 2008
Hi Oscar,
should work in that way:
A=eval(strcat("load(ff",int2str(i))))
Wo
-------- Original-Nachricht --------
> Datum: Tue, 5 Aug 2008 16:46:38 +0200
> Von: Oscar Bayona Candel <oscarbayonacandel at hotmail.com>
> An: help-octave at octave.org
> Betreff: Execute the same calculus to different data files
>
>
>
>
> %%%%% I have a data file "ff1.m" whose rows and columns are
> 1 2
> 2 2
>
> I have created this file:
> A=load("ff1.m")
> B=A+2
>
> %%%% So that B=[3 4;4 4]
>
> Imagine that I have twenty new files (data files) called ff2, ff3,...ff20
> external files with diferent matrix information I want to use.
>
> I want to create a function (I know that this example is wrong) similar to
> this:
>
> for i=1:20
> A(i)=load("ff(i).m")
> B(i)=A(i)+2
> end
>
> Do you know a procedure to do it?
>
> Thanks in advance and best regards¡¡¡¡
>
> _________________________________________________________________
> ¿Preparándote para el verano? En Windows Live Search encontrarás las
> mejores dietas para conseguir tu peso ideal
> http://search.live.com/results.aspx?q=dieta&form=MKTPG
--
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx
More information about the Help-octave
mailing list