Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.

1 次查看(过去 30 天)
fid = fopen('zaki_susu_preproc.txt','r'); %open file txt
C = textscan(fid,'%f%f%f%f');
fclose(fid);
YR = cell2mat(C); %ERROR
x1 = YR(:,2:2); %choose one column
fs = 250; %sampling freq
figure(1) %plot sinyal
plot(x1)
Unable to perform assignment because the indices on the left side
are not compatible with the size of the right side.
Error in cell2mat (line 46)
M(i,j) = C{i,j};
Error in coba1 (line 4)
YR = cell2mat(C);

回答(1 个)

Walter Roberson
Walter Roberson 2022-9-25
Error in cell2mat (line 46)
M(i,j) = C{i,j};
That line of code does not exist in Mathworks cell2mat, at least not in 2019 or later. What shows up for
which -all cell2mat

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by