How do I take a variable I have in matlab and save it as a file?

Status
Not open for further replies.

Galvanox

Newbie level 1
Joined
Mar 19, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
I have a variable called: form. Its exact contents are:
I thought a thought.

But the thought I thought wasn't the

thought I thought I thought.

how do I save these contents as its own file?
 

text1='galvanox'
fidH = fopen('Hbbwds9.dat','w');
fwrite(fidH,text1,'char');
fclose(fidH);
fidH = fopen('Hbbwds9.dat','r');
a = fread(fidH);
fclose(fidH);

the text will be saved in ascii values.....

---------- Post added at 10:11 ---------- Previous post was at 10:10 ----------

text1='galvanox'
fidH = fopen('Hbbwds9.dat','w');
fwrite(fidH,text1,'char');
fclose(fidH);
fidH = fopen('Hbbwds9.dat','r');
a = fread(fidH);
fclose(fidH);

the text will be saved in ascii values.....
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…