{'22,1'}
ans = 1×1 cell array
{'22,1'}
{'22,1'}
ans = 1×1 cell array
{'22,1'}
{'21,8'}
ans = 1×1 cell array
{'21,8'}
{'22,0'}
ans = 1×1 cell array
{'22,0'}
I hae extrated those data from TXT file. I tried to use
% T.(i) = str2double(T{:,i});
no working
I tried to use
str2num(char({'21,8'}))
ans = 1×2
21 8
I want instead 21.8 and repeat the format for the whole colonn

답변 (1개)

David Hill
David Hill 2022년 11월 23일

1 개 추천

Try using the following.
m=readmatrix('yourData.txt','DecimalSeparator',',');

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2022년 11월 23일

답변:

2022년 11월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by