0

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'];

1 Answer 1

1

The cell array concatenation operator is {};

names = {'name1';'name2';...;'namen'};
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.