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:
Saving csv-file in specific directory

Subject: Saving csv-file in specific directory

From: Ulrik Nash

Date: 22 Feb, 2014 22:15:10

Message: 1 of 2

Hello,

I have a simple question, which I have been unable to find the answer for. Having created a csv file in my MATLAB directory, I wish to place this file at another specific destination. Or even better, perhaps I can create the original file in that same place, thus reducing the computational steps.

But how do I do this?

Regards,

UWN

Subject: Saving csv-file in specific directory

From: TideMan

Date: 23 Feb, 2014 04:53:13

Message: 2 of 2

On Sunday, February 23, 2014 11:15:10 AM UTC+13, Ulrik Nash wrote:
> Hello,
>
>
>
> I have a simple question, which I have been unable to find the answer for. Having created a csv file in my MATLAB directory, I wish to place this file at another specific destination. Or even better, perhaps I can create the original file in that same place, thus reducing the computational steps.
>
>
>
> But how do I do this?
>
>
>
> Regards,
>
>
>
> UWN

Cut and paste is a pretty basic Windows operation. Nothing to do with Matlab.
What's the problem?

To write the file in the desired directory, simply add the path to the file name:
csvfile='d:\MyDirectory\Data\MyFile.csv';
fid=fopen(csvfile,'wt');
  -
  -
  -
fclose(fid);

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