Store fllepath in variable
    9 ビュー (過去 30 日間)
  
       古いコメントを表示
    
Hello all! Quick question:
is it possible to store a fullpath: C:\Users\ecorbett\Documents\MATLAB\Labelers\fred into a variable and use that variable in functions like csvwrite?
0 件のコメント
採用された回答
  Nathan Greco
      
 2011 年 8 月 2 日
        Yes. Just store it as a string.
   filepath = 'C:\Users\ecorbett\Documents\MATLAB\Labelers\fred';
   filename = 'text.csv';
   csvwrite(fullfile(filepath,filename),MatrixYouWantToStoreToFile);
その他の回答 (1 件)
  Sean de Wolski
      
      
 2011 年 8 月 2 日
        Sure:
fp = 'C:\Users\ecorbett\Documents\MATLAB\Labelers\fred\' %added extra \
csvwrite([fp 'my_example_csv.csv'], magic(5)) %add file name
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


