[Scilab-users] mixed data type matrix

Tim Wescott tim at wescottdesign.com
Thu Mar 23 18:28:30 CET 2017


On Thu, 2017-03-23 at 11:12 +0100, Jan Åge Langeland wrote:
> 
> On 23.03.2017 09:54, fujimoto2005 wrote:
> > 
> > I want to make the matrix whose the first column has the date value
> > such as
> > 2007/5/1 which I can use it in Excel and whose second column has
> > the
> > numerical value such as 0.12.
> > How can I construct such mixed data type matrix which I can copy it
> > and
> > paste it to Excel?
> > List is not a solution because I can copy it to the clipboard
> > through the
> > variable browser.
> > 
> Just convert the numerical value to a string:
> date=["2007/1/1" "2008/2/2" "2009/3/3"]'
> num=[1.1 2.2 3.3]'
> Mdn=date
> Mdn(:,2)=string(num)
> 
> Copy from variable browser or if you prefer, go via a csv file:
> 
> csvWrite(Mdn,"datafile.csv",";")

Or just write out a csv file.

Or, if it's a small enough data set, print it to the console, copy, and
paste into Excell.

-- 

Tim Wescott
www.wescottdesign.com
Control & Communications systems, circuit & software design.
Phone: 503.631.7815
Cell:  503.349.8432






More information about the users mailing list