Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
I'm Trying to save a contents into a mat file. But after the contents are saved to a mat file, it shows the file name as :SData_200_500_20_1.matSData_109_97_116_
조회 수: 2 (최근 30일)
이전 댓글 표시
The mat file format in my code for saving the record is
save (sprintf('SData_%d_%d_%d_%d.mat',NrGrid,noOfNodes,R,nf,'mat'),'stat_record')
The code is working error free. But The file displayed in folder is saved as
SData_200_500_20_1.matSData_109_97_116_
Then I tried to rename the file by moving to matlab folder as:
SData_200_500_20_1.mat
kindly, help me to solve this problem
댓글 수: 0
답변 (1개)
Star Strider
2015년 8월 2일
You have already named the file, including the .mat extension, so you don’t need to include it in the sprintf argument list. It is creating problems, because it overflows the numeric fields in your edit descriptor, adding the ‘_109_97_116_’ as it writes the ASCII values of 'mat' to your file name string.
This illustrates the problem:
Q = int8('mat')
Q =
109 97 116
I’m otherwise not certain how to interpret your save call.
댓글 수: 5
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!