Error using fprintf : Function is not defined for 'cell' inputs

41 ビュー (過去 30 日間)
Pamela Pindi
Pamela Pindi 2020 年 10 月 21 日
コメント済み: Pamela Pindi 2020 年 10 月 21 日
Hi all,
I have a problem with my code : when I try to run this code :
fprintf(outputfile, '%s\t %s\t %d\t %s\t %s\t', subID, imageFolder, t, textString, file);
I have an error message :
Error using fprintf
Function is not defined for 'cell' inputs.
Error in runImageSequence_NFB (line 163)
fprintf(outputfile, '%s\t %s\t %d\t %s\t %s\t', subID, imageFolder, t, textString, file);
Can you please help me ?
  1 件のコメント
KSSV
KSSV 2020 年 10 月 21 日
You have to use {} braces for cell.

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

採用された回答

drummer
drummer 2020 年 10 月 21 日
what if you do
fprintf(outputfile, 'blah %s', string(subID)) % sure, if that's your cell variable you want to display.
Cheers.
  1 件のコメント
Pamela Pindi
Pamela Pindi 2020 年 10 月 21 日
Yes ! It works !
Thanks a lot

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by