MATLAB: Save a variable that will have a different sized data

cell array

Hello Everyone,
I am trying to save data (in a row/column) in a single variable? For example, I have five variables, a, b, c, d, e and each has a different size (length). I want to save their data on a single variable, say All_variable such that the All_variable should be 1×5 cell in which each cell should have the data (of different size) of the five previously mentioned variables.
Thank you!

Best Answer

  • All_variable = {a, b, c, d, e};