help-octave
[Top][All Lists]
Advanced

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

Re: eliminte "ans" and print file as is on the screen


From: Carlo De Falco
Subject: Re: eliminte "ans" and print file as is on the screen
Date: Thu, 10 Jan 2019 11:15:01 +0000


> On 10 Jan 2019, at 12:05, eugenia <address@hidden> wrote:
> 
> Hi!
> since a few days I am trying to plot something. I think I found a way but I
> need to print a file with the same format I see on the screen but I need to
> eliminate "ans".
> I have a variable CHIS1.
>>> disp(CHIS1(1,:,:))
> ans(:,:,1) =
> 
>   3.3208e-04   3.6136e-04   3.4397e-04   3.2282e-04   3.0488e-04  
> 3.5576e-04
> 
> ans(:,:,2) =
> 
>   7.8157e-04   6.4418e-04   6.8477e-04   5.5001e-04   4.8390e-04  
> 4.0325e-04
> 
> ans(:,:,3) =
> 
> 3.9184e-04   2.5231e-04   4.5585e-04   3.9979e-04   3.8978e-04   0.0000e+00
> .
> ..
> 
> An I want to print this in a file (without "ans")  with this format:
> 
>   3.3208e-04   3.6136e-04   3.4397e-04   3.2282e-04   3.0488e-04  
> 3.5576e-04
>   7.8157e-04   6.4418e-04   6.8477e-04   5.5001e-04   4.8390e-04  
> 4.0325e-04
>  3.9184e-04   2.5231e-04   4.5585e-04   3.9979e-04   3.8978e-04  
> 0.0000e+00
> .
> .
> 
> 
> I tried to apply many instructions on the web but they didn't work... Can
> somebody help me?
> 
> Regards,
> Marie Eugenia

try 

  disp (squeeze (CHIS1(1,:,:)))

to show the data on screen and

  A = squeeze (CHIS1(1,:,:));
  save -ascii my_file.txt A

to save it to file,
c.







reply via email to

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