error in mat to csv conversion

2 ビュー (過去 30 日間)
zara mansoor
zara mansoor 2016 年 3 月 28 日
コメント済み: zara mansoor 2016 年 3 月 29 日
load('fif.mat'); csvwrite('fif.csv', fif); ERROR: convert Error using dlmwrite (line 130) Could not open file fif.csv
Error in csvwrite (line 43) dlmwrite(filename, m, ',', r, c);
Error in convert (line 2) csvwrite('fif.csv', fif);
the code is loading file but not converting it.
  2 件のコメント
Kirby Fears
Kirby Fears 2016 年 3 月 28 日
After running load('fif.mat'); is there a variable in your workspace called fif? If so, what are the contents and data type?
You are passing fif to csvwrite as if it's a workspace variable. If you have a double array called fif in your workspace, that would work.
zara mansoor
zara mansoor 2016 年 3 月 28 日
yes it loads a mat file named as 'fif' that contains 21*96 complex double data e.g 2.023672462915360 + 0.000000000000000i. I jst want to convert this mat file to csv. yes Im also storing in my code these values in a variable called fif. it worked previously bt now suddenly showing this error.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2016 年 3 月 28 日
  • You might be cd'd to a directory that you cannot write to
  • fif.csv might already exist but have its security set so that you cannot write it
Look at
cd
fileattrib('.')
which fif.csv
fileattrib('./fif.csv')
  3 件のコメント
Walter Roberson
Walter Roberson 2016 年 3 月 28 日
編集済み: Walter Roberson 2016 年 3 月 28 日
You are in a directory you cannot write into. You need to
cd E:\SEMESTERS_WORK\MS_2k14\THESIS\code by date\csv
zara mansoor
zara mansoor 2016 年 3 月 29 日
Thanks @walter it worked.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStandard File Formats についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by