How to extract and convert mat from cell using for loop?

How to extract and convert mat from cell using for loop?

1 comentario

Jan
Jan el 29 de Ag. de 2017
Editada: Jan el 29 de Ag. de 2017
Please post useful details. What exactly is "mat", which format does it have, and to which type of data do you want to convert it? Why do you need a loop?
You participate in the forum for a long time now. We can expect that you know and consider https://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer. You can reduce the need for questions for clarifications by providing the details. Remember that the readers do not have the faintest idea about what you are doing, because they cannot read your mind. Posting questions, which require to guess all details, wastes your time and the time of the readers.

Iniciar sesión para comentar.

Respuestas (1)

data = {rand(10,1),rand(20,11)};
for ii = 1:numel(data)
result = data{ii}; %result is the extracted data
end

4 comentarios

thanks jose but its error , its means this way wroung ?
Selva Karna
Selva Karna el 29 de Ag. de 2017
Editada: Stephen23 el 29 de Ag. de 2017
actually my question is , i have 5 cell datas, i need to convert mat file same data without mingle [mixing], how is it possible?
José-Luis
José-Luis el 29 de Ag. de 2017
Editada: José-Luis el 29 de Ag. de 2017
I don't understand what you mean.
" its [sic] error " is not a useful description of your problem . The code I provided should run just fine.
I do not understand what you are trying to achieve.
Please provide an example (minimum working example) with the expected input/output.
Adam
Adam el 29 de Ag. de 2017
If you are going to come back and say 'Actually my question is...' why don't you just do yourself and everyone trying to answer a favour by asking the question you want to ask, in a complete manner, in the actual question, instead of a vague one line question?!

Iniciar sesión para comentar.

Categorías

Productos

Preguntada:

el 16 de Ag. de 2017

Comentada:

el 29 de Ag. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by