MATLAB: Making a new variable variables Best Answer newVar=[sum(first(:,1),sum(second(:,1),sum(third(:,1)]; Related SolutionsMATLAB: Set a variable equal to the count numel() MATLAB: Making Dynamic array What do you need it for?There's no such thing as a dynamic array but you can grow an array with concatenation which is usually not recommended (or was not recommended).If you have:A = rand(10,1);You can grow it as:A = [A; rand(5,1)];Such practice very often can be avoided.Read the first 4 chapters of the getting started guide to see more examples of basi array operations. Related QuestionHow to save the number of iterations in while loopHow to calculate a cumulative sum in a loopMaking a substitution
Best Answer