load matrix from *.txt file

1 view (last 30 days)
Cruise
Cruise on 13 Mar 2012
Hi everybody, I want to load a matrix from *.txt file by use command "load" example: value.txt
2050 0 1175 1
2050 2110 1452 1
2050 2334 1663 1
2050 2724 2670 1
2050 2730 3067 1
This is my code
{load C:\Matlab\value.txt
value1=load}
Is it not right? How can i do? Thanks a lot.
  2 Comments
Jan
Jan on 13 Mar 2012
"value1=load" is not correct.
Cruise
Cruise on 13 Mar 2012
So how do i do to solve it?

Sign in to comment.

Accepted Answer

Aldin
Aldin on 13 Mar 2012
Hey you!
Use excel file is much easier and better than txt. If you want i can write for you the algorithm how to do this in with excel??
  2 Comments
Cruise
Cruise on 13 Mar 2012
Thank you so much!!!
I did it.
A=(load 'C:\Users\Documents\MATLAB\'value.txt)
Don't use ";" because it not show matrix.
Aldin
Aldin on 14 Mar 2012
Than accept your answer that anybody knows that it is seccussful closed.

Sign in to comment.

More Answers (0)

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!