How to retrieve data from cell ?

3 views (last 30 days)
nisha bhatt
nisha bhatt on 9 Oct 2022
Commented: Star Strider on 9 Oct 2022
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) ) );

Answers (0)

Categories

Find more on Resizing and Reshaping Matrices in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!