Question: Basics about data file plotting

Hello.

I can't find a very "basic" tutorial about data file plotting and I have very simple questions.

Assume that we have a file that contains :

0.5 0.2

0.3 0.9

0.4 0.1

0.7 0.6

 

The first thing to do is to read data. I have no problems for that :

mydata:=readdata("test.txt",2)

Then

mydata=[[0.5,0.2],[0.3,0.9],[0.4,0.1],[0.7,0.6]]

 

Question n°1 : What is the syntax to obtain two new variables x=[0.5,0.3,0.4,0.1] (column 1) and y=[0.2,0.9,0.1,0.6] (column 2) from "mydata"?

Question n°2 : How to sort the column 1 AND 2 (x and y) in the increasing order for column 1 ?

Question n°3 : How to plot the points from x and y sets and to display a regression curve ?

 

Thank you very much.

 

 

 

 

 

Please Wait...