help-octave
[Top][All Lists]
Advanced

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

Re: How to convert mesh data in octave to Gnuplot data file


From: Marc Normandin
Subject: Re: How to convert mesh data in octave to Gnuplot data file
Date: Thu, 18 Sep 2008 00:00:38 -0400
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

pauljoseph wrote:
> Hi,
> 
> is there a function in Octave to convert a matrix into block data to be plot
> in gnuplot.
> For example if I have a 3x3 matrix
> z=
> 0 0 0
> 0 1 0
> 0 0 0
> 
> and rows means x and cols means y,
> x=[1,2,3]
> y=[1,2,3]
> 
> is there any function to convert to block data to be used gnuplot:
> #x y z
> 1 1 0
> 1 2 0
> 1 3 0
> 
> 2 1 0
> 2 2 1
> 2 3 0
> 
> 3 1 0
> 3 2 0
> 3 3 0
> 
> I appreciate your help. Thanks.
> --
> View this message in context: 
> http://www.nabble.com/How-to-convert-mesh-data-in-octave-to-Gnuplot-data-file-tp19545393p19545393.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

Does something like

[x,y] = meshgrid (1:size(z,1), 1:size(z,2))

do what you want?

-- 
------------------------------------------------------------------
Marc D. Normandin              http://web.ics.purdue.edu/~mdnorman
Graduate Research Assistant                     address@hidden
Indiana University School of Medicine           317-278-9841 (tel)
Department of Radiology, Division of Research   317-274-1067 (fax)
------------------------------------------------------------------


reply via email to

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