문제

I have quite a big array of strings that's in the format ['name1';name2';...], where names don't have the same size.

I know I have to use cells in MATLAB, but I can't figure out how to use it in this case.

The best I came up with was this, but it doesn't work.

names = cell(1,n);
names(1:n) = ['name1';'name2';...;'namen'];
도움이 되었습니까?

해결책

The cell array concatenation operator is {};

names = {'name1';'name2';...;'namen'};
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top