How to store data in multiple matrix from table
Mostrar comentarios más antiguos
I have one time series data in a table of 260000 x 3. where col_1 = parameter_one, col_2 = parameter_two, col_3 = time.
I want to collect the data when there is change in parameter an then stored inside a different matrix.
example: If there is change in parameter for 9 times then it should stored the data of that parameter in 9 different arrays where. array(1) = parameter and array(2) = time data.
function slopeplot(DATA_1)
data = table2array(DATA_1);
thrust = ones(1,1);
c2 = 1;
for c = 1:9
for i = c2:length(data)
thrustslope = (data(i+1,1)-data(i,1))/(data(i+1,3)-data(i,3));
if thrustslope >= abs(0.2)
thrust(i,1) = data(i,1);
thrust(i,2) = data(i,3);
elseif thrustslope == 0
c2 = i;
break;
else
continue;
end
end
subplot(3,3,c);
plot(thrust);
end
end

My code is working with zero error; however, i am not getting plots as well as array varibles in the workspace.
is there anything wrong with my logic?
i ran the code line by line; however, unable to find the bug.
Kindly help me.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Graphics Performance en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!