Hi,
I want to save a .csv file which i made by myself to a given path. The way I have it now it will be saved in de path which is open in the current folder explorer.
how can i send this to a given path name. This name will vary in a loop
Ocsvname = 'vessel'+string(i)+'.csv';
data_reinterp = interp1(sample_dist,DataText,dist_interp,'pchip');
%save as csv file
csvwrite(Ocsvname, data_reinterp);

 채택된 답변

Just Manuel
Just Manuel 2021년 2월 18일

0 개 추천

Just provide an absolute path instead of a relative one. Such as
csvwrite('c:\temp\data.csv',ones(2,5));
You can also combine path and name using fullfile
>> fullfile('c:\temp','data.csv')
ans =
'c:\temp\data.csv'
Cheers
Manuel

댓글 수: 2

Dion Theunissen
Dion Theunissen 2021년 2월 18일
Thanks Manuel
Just Manuel
Just Manuel 2021년 2월 18일
You're welcome!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2021년 2월 18일

댓글:

2021년 2월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by