Reshaping Multi-Dimensional Arrays in MATLAB

  • Context: MATLAB 
  • Thread starter Thread starter short circut
  • Start date Start date
  • Tags Tags
    Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
short circut
Messages
16
Reaction score
0
Ok so here is the problem
I have a 15x15x4001 structure. Basically it is a matrix at 4001 time points.
I want to track one element at a time as a function of time

the problem is that

mystruct(1,1,:)

is being read as a 1x1x4001 structure
I want it to read in as either 4001x1 or 1x4001

How can I do this without making a for loop to convert each one individually?

If MATLAB doesn't have a built in function for this I can make one but it should already have that functionality built in.
 
Physics news on Phys.org
Thank you. I wasnt even sure what to look for in the documentation. I did look there before I asked. I promise.