How to retrieve data from cell ?

3 次查看(过去 30 天)
nisha bhatt
nisha bhatt 2022-10-9
I have saved 100 iterations data in a cell using command
% here x is a matrix that contains 7 variables
% so M_n has a dimension 1xi where i=100 in this case;
% in each i has dimension 7X1 cell ;
%in each iteration, each state vector in x share same no of enteries but the size of each state changes with iteration..the no is not known a priori ..
%for example at i=1, each state in x has total 8000 enteries whereas at i=2, each state in x has 45 enteries...and so on..how to access this data ...%
% similarly time has 1xi dimension..each i has 1x1 cell..in each cell,
% different no of enteries are there ..but no of enteries are equal to no
% of enteries in each state
t_new(i)=mat2cell( t, [size(t,1)], ones( 1, size(t,2) ) );
M_n{i} = mat2cell( x, [size(x,1)], ones( 1, size(x,2) ) );

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by