Extract entire matrices from a cell

조회 수: 1 (최근 30일)
AS
AS 2020년 1월 28일
댓글: AS 2020년 1월 28일
Hallo,
I have a cell which contains 10 matrices. Each matrix contains data from a different sensor and all matrices have different number of rows although they have the same number of columns. I would like to extract the entire matrices from the cell and keep the name of each matrix.
Thanks in advance
  댓글 수: 5
Walter Roberson
Walter Roberson 2020년 1월 28일
Leave them in the struct. Use structfun() . Or use struct2cell() and cellfun()
AS
AS 2020년 1월 28일
You are write, its a structure and it is better to do al the calculations inside the structure.

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

답변 (1개)

Selva Karna
Selva Karna 2020년 1월 28일
clc
clear all;
close all;
cel_len=length(your_cell);
for i=1:cel_len
exta_cel=your_cell(i);
ext_data(i)=ext_cel
end
  댓글 수: 1
AS
AS 2020년 1월 28일
Thanks for the answer. However this solution creates again the new structure ext_data with the same matrices.

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

카테고리

Help CenterFile Exchange에서 Variables에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by