필터 지우기
필터 지우기

Regarding concatenated error.

조회 수: 1 (최근 30일)
Feihao Sun
Feihao Sun 2020년 7월 17일
답변: Khaled Hamed 2020년 7월 17일
Hi guys! I tried to put a 2x1 cell array into a one row matrix. I tried to use cell2mat but it didn't work. Please help!
i used the following code:
filename = 'glider.txt'
data1 = importdata(filename)
data = cell2mat(data1)
so glider.txt intitally shoud be
x=3, y=3
bo$2bo$3o!
All i really wanted it to be is just x=3,y=3bo$2bo$3o!
but when I ran my code i got the following error:
Error using cat
Dimensions of arrays being concatenated are not consistent.
Error in cell2mat (line 83)
m{n} = cat(1,c{:,n});

채택된 답변

Khaled Hamed
Khaled Hamed 2020년 7월 17일
data = cell2mat(data1')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by