Calculations in the cell array
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Given is a cell array where I want to perform calculations (e.g. double all values). The cell array should also be retained for the further operation.
I thought I could just do this as follows:
test={1; 2; 3; 4; 5}
test=test.*2
Which of course didn't work ...
Any ideas?
0 Kommentare
Antworten (1)
Mouhamed Niasse
am 12 Jun. 2021
Hello,
Here is what i achieved based on my understanding of your question.
Hope it does help.
test={1; 2; 3; 4; 5}
test=num2cell(cell2mat(test)*2)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!