Leave one out of an array in a for loop

2 views (last 30 days)
Joana on 20 Feb 2021
Dear all
I have a program where i need to save one variable separately and concatenate i-1 elements in another variable (Then i need to perform some data analysis these two new variables). here is my code where i am concatenating all the elements.
Can anyone please help how i can edit it according to my problem.?
for i=1:30
resultFileName = sprintf('Sub%i.mat',i); % generate result filename
Es{i} = feat'; % Make a cell array
feat_Concatenate = vertcat(Es{:}); % concatenate the array

Answers (0)


Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by