How to print the mpfitfun output to a file? [message #93406] |
Thu, 07 July 2016 03:13  |
Sonu Tabitha
Messages: 29 Registered: April 2016
|
Junior Member |
|
|
I gave the code like the following
res = mpfitfun('model',x,y,err,p,PARINFO=par)
print,res
fname='/home/meegle_jade/data1.dat'
OPENW,1,fname
PRINTF,res
CLOSE,1
But it's showing error. Infact I wanted to write the output 'res' to data1.dat.Can you please help me out?
|
|
|
Re: How to print the mpfitfun output to a file? [message #93407 is a reply to message #93406] |
Thu, 07 July 2016 03:45   |
Richard Morton
Messages: 7 Registered: April 2016
|
Junior Member |
|
|
On Thursday, July 7, 2016 at 11:13:19 AM UTC+1, Meegle_Jade wrote:
> I gave the code like the following
> res = mpfitfun('model',x,y,err,p,PARINFO=par)
> print,res
> fname='/home/meegle_jade/data1.dat'
> OPENW,1,fname
> PRINTF,res
> CLOSE,1
>
> But it's showing error. Infact I wanted to write the output 'res' to data1.dat.Can you please help me out?
You need to specify the logical unit your writing to, e.g., PRINTF,1,res
|
|
|
Re: How to print the mpfitfun output to a file? [message #93409 is a reply to message #93406] |
Thu, 07 July 2016 18:17  |
Sonu Tabitha
Messages: 29 Registered: April 2016
|
Junior Member |
|
|
On Thursday, July 7, 2016 at 3:43:19 PM UTC+5:30, Meegle_Jade wrote:
> I gave the code like the following
> res = mpfitfun('model',x,y,err,p,PARINFO=par)
> print,res
> fname='/home/meegle_jade/data1.dat'
> OPENW,1,fname
> PRINTF,res
> CLOSE,1
>
> But it's showing error. Infact I wanted to write the output 'res' to data1.dat.Can you please help me out?
Oh..Okay. Thanks a lot!
|
|
|