필터 지우기
필터 지우기

How to convert a cell into normal matrix?

조회 수: 2 (최근 30일)
Akhil  Reddy
Akhil Reddy 2016년 6월 9일
답변: Sachin Shrestha 2016년 6월 9일
cell2mat is not working
  댓글 수: 1
Jos (10584)
Jos (10584) 2016년 6월 9일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Sachin Shrestha
Sachin Shrestha 2016년 6월 9일
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!

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by