How to convert a cell into normal matrix?

2 Ansichten (letzte 30 Tage)
Akhil  Reddy
Akhil Reddy am 9 Jun. 2016
Beantwortet: Sachin Shrestha am 9 Jun. 2016
cell2mat is not working
  1 Kommentar
Jos (10584)
Jos (10584) am 9 Jun. 2016
Why not? It works perfectly on my computer ...
You have to show us the input, the code, the expected output and the error you get. Most of us here are not blessed with clairvoyance or other mindreading abilities.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Sachin Shrestha
Sachin Shrestha am 9 Jun. 2016
Hi Akhil,
If possible provide more details, the problem could be with the input that you have provided and the output that you are expecting; else cell2mat should work fine.
For e.g.
x_cell={1,2,3,4,5}; % cell
x_mat=cell2mat(x_cell); % after conversion to matrix
disp(sum(x_mat)); % sum the contents of matrix
Good Luck!

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by