I am trying to print 2 vectors side by side.
The relevant code is:
strVal1_5 = [resLeftX, resLeftY]
fileID1 = fopen(Test.txt','wt');
fprintf(fileID1,'%.6 %.6f\r\n',strVal1_5);
Can someone please point me into the right direction.
When I specified
strVal1_5 = [resLeftX; resLeftY]
The values no longer where written into the file.

 採用された回答

Star Strider
Star Strider 2016 年 10 月 11 日

0 投票

Interesting. I’d forgotten that one.
You have a typo here:
fprintf(fileID1,'%.6 %.6f\r\n',strVal1_5);
↑ ← YOU NEED ‘f’ HERE
This should work:
fprintf(fileID1,'%.6f %.6f\r\n',strVal1_5);

その他の回答 (1 件)

Jay
Jay 2016 年 10 月 11 日

0 投票

Thankyou Star Strider

1 件のコメント

Star Strider
Star Strider 2016 年 10 月 11 日
My pleasure.

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

カテゴリ

ヘルプ センター および File ExchangeFile Operations についてさらに検索

質問済み:

Jay
2016 年 10 月 11 日

コメント済み:

2016 年 10 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by