[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: saving results
From: |
Andy Buckle |
Subject: |
Re: saving results |
Date: |
Thu, 3 Jun 2010 10:43:57 +0100 |
I wrote a script that might help you get started. Good luck, Andy
w=whos();
fid=fopen("var.txt","w+"); % TODO: check for file io error
for i=1:length(w)
var=w(i);
if strcmp(var.class,"double")
fprintf(fid,"%s = %.3f\n",var.name,eval(var.name));
elseif strcmp(var.class,"char")
fprintf(fid,"%s = %s\n",var.name,eval(var.name));
end
% TODO: handle other classes
end
fclose(fid);
On Wed, Jun 2, 2010 at 8:13 PM, wujekk13 <address@hidden> wrote:
>
> I used the function save
> "save ("-text", "end")"
> as a result I received:
> "# Created by Octave 3.2.4, Wed Jun 02 20:39:07 2010 CEST <address@hidden>
> # name: Ad
> # type: scalar
> 34.8
> # name: Am
> # type: scalar
> 19.2
> ...."
> Nevertheless I would like to have result in form:
> "Ad = 34.800
> pied = 2.1000
> szed = 7.0300
> sied = 1440
> osid = 247
> Iyzd = 338
> hm = 10
> sm = 10
> gm = 1
> Am = 19.200
> ....."
> how to do it.
> --
> View this message in context:
> http://octave.1599824.n4.nabble.com/saving-results-tp2240657p2240657.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
--
/* andy buckle */