Azzera filtri
Azzera filtri

CELL ARRAY AND FOR LOOP

2 visualizzazioni (ultimi 30 giorni)
DINI
DINI il 30 Mag 2019
Commentato: DINI il 31 Mag 2019
Hello everyone, I'm doing some tests and I need to create and save certain values.
The thing is that I do not know how to introduce the 6th line inside the first loop est = {est_1, est_2, est_3, est_4};
The second problem is that at the end of the second loop, I save the variable input accommodated, but only stored the last iteration, I do not know how to store ALL in a new array of cells input(ind_24,:)= [];
clear all
%cargo todas los puntos grilla
puntos = 4;
for i=1:puntos
load(['est_',num2str(i),'.est']);
end
est = {est_1, est_2, est_3, est_4};
%Filtro valores iniciales, para que la matriz este comprendida envalore del 0 - 23.
for i=1:puntos
input = est{i};
ind_24 = find(input(:,5)==24);
input(ind_24,:)= [];
end

Risposta accettata

meghannmarie
meghannmarie il 31 Mag 2019
Try this, if I am understanding your questions right:
%cargo todas los puntos grilla
puntos = 4;
est = cell(puntos);
for i=1:puntos
load(['est_',num2str(i),'.est']);
est{i} = eval(['est_' num2str(i)]);
end
% est = {est_1, est_2, est_3, est_4};
%Filtro valores iniciales, para que la matriz este comprendida envalore del 0 - 23.
inputs = cell(puntos);
for i=1:puntos
input = est{i};
ind_24 = find(input(:,5)==24);
input(ind_24,:)= [];
inputs{i} = input;
end

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by