Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Matlab save, how to get all the data in one row?

Subject: Matlab save, how to get all the data in one row?

From: Mostafa

Date: 18 Nov, 2010 15:17:05

Message: 1 of 2

Hi All,

I am analyzing data using Matlab. I am using a for loop so that it would run 6 times. I have it to save in ASCII format and append the file at the end of every loop. However, it creates a new row for every time it goes through the loop. Is there any way for me to save all 6 data rows in 1 row rather than 6?

The line I'm using to save is:
save('44force.txt','-ascii','ForcePeak2Peak', '-append');

with 44force.txt the file I'm saving and ForcePeak2Peak the variable I'm saving. Thank you very much for your help.
Moe

Subject: Matlab save, how to get all the data in one row?

From: Sean de

Date: 18 Nov, 2010 15:27:03

Message: 2 of 2

"Mostafa " <mafifi@kin.ucalgary.ca> wrote in message <ic3g1h$3u1$1@fred.mathworks.com>...
> Hi All,
>
> I am analyzing data using Matlab. I am using a for loop so that it would run 6 times. I have it to save in ASCII format and append the file at the end of every loop. However, it creates a new row for every time it goes through the loop. Is there any way for me to save all 6 data rows in 1 row rather than 6?
>
> The line I'm using to save is:
> save('44force.txt','-ascii','ForcePeak2Peak', '-append');
>
> with 44force.txt the file I'm saving and ForcePeak2Peak the variable I'm saving. Thank you very much for your help.
> Moe

Combine it all before you save?

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us