Problem with textscan in matlab 2016a
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi together, i attached a text file and the matlab script. I run the script with matlab2014 and matlab2016a. Why there is a difference in the result. the result with 2014 ist the wanted result.
Thank you for your help.
댓글 수: 0
채택된 답변
Star Strider
2016년 6월 2일
I’m not certain what problem you are having.
This works for me in R2016a:
fidi = fopen('Rica Test_1.txt','rt');
Ac = textscan(fidi, '%f%f%f%f%f', 'HeaderLines',1, 'CollectOutput',1);
A = cell2mat(Ac);
The cell2mat call converts the cell array ‘Ac’ to double array ‘A’.
댓글 수: 2
Star Strider
2016년 6월 2일
The ‘A’ matrix in my code is a (860x5) double array. It is not a cell array, so there is no need to use cell indexing with it.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Export에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!