MATLAB Answers

How to save a vector v=[1 2 3 4]; into a text file. How to do that?

1 view (last 30 days)
Gemalyn Apostol
Gemalyn Apostol on 17 Oct 2016
Commented: Gemalyn Apostol on 17 Oct 2016
How to save a vector v=[1 2 3 4]; into a text file. How to do that? [Hint use save] in matlab?

  0 Comments

Sign in to comment.

Accepted Answer

KSSV
KSSV on 17 Oct 2016
v=[1 2 3 4];
save('myfile.txt','v','-ascii')

  5 Comments

Show 2 older comments
KSSV
KSSV on 17 Oct 2016
If no error pops...in the folder you are working....a txt file called data will be created with vector v in the file.
Gemalyn Apostol
Gemalyn Apostol on 17 Oct 2016
Sir how about this one? can you help me with this?
Given A = [ 1 120; 1 130; 2 140; 3 180; 3 160 ]
B = [ 1 91; 2 92; 3 93 ]
targetdata = [ 1 120 91; 1 130 91; 2 140 92; 3 180 92; 3 160 93 ]
Let be given three points A, B, C in the Euclidean plane. Determine the fourth point D on the line BC so that AD is orthogonal to BC.

Sign in to comment.

More Answers (0)

Tags

No tags entered yet.