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

카테고리

도움말 센터File Exchange에서 File 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