Beginner: help with matrix extraction
André Victória
avic at bios.srv.br
Wed Jan 23 13:41:34 CET 2008
Hello,
I am trying to make a script to process some data. Right now I have a
little trouble with reading this data onto my variables, that I can´t
figure out from the Scilab help. I use Scilab-4.1.2 on Windows 98.
I am a beginner with this kind of program (Scilab, Octave or Matlab), I
appologise for what seems to me a very basic question. But I have tried
my best to understand it by now.
My data file is:
------------------------------------------------------------------------
4.02 45
4.26 29.9
4.41 30
4.43 30.1
4.75 19.9
4.97 20
5 20.1
5.26 14.9
5.57 15
5.6 15.1
5.7 15.1
5.87 10.9
6.24 11
6.46 11.1
6.61 7.9
7.2 8.1
7.27 8.2
7.32 8
8.23 4.9
9.15 5
9.55 5.1
9.7 5.1
17.36 1.9
17.8 2.5
18.4 2.4
19.36 2
------------------------------------------------------------------------
The first lines of my main function are:
------------------------------------------------------------------------
Z = read('(...path...)\input.txt',-1,2);
X = Z(1)';
Y = (Z(2))';
// X = Z(1);
// Y = Z(2);
------------------------------------------------------------------------
Using the debugger I have found that the Z matrix has all the data on
the input file. Now I wanted to have on column of data on X and Y
vectors. I have tried the commented two lines. All these tries had the
same result: after the execution of the third line X has the value 4.02
and only; Y has 4.26 value, and only. Z has all the data values in the
form [ aa.a bb.b; cc.c dd.d; ... ].
What should I do?
Thank you in advance,
Andre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20080123/a148e7d1/attachment.htm>
More information about the users
mailing list