Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How to import specific data in multiple tables by table2array command

1 Ansicht (letzte 30 Tage)
chihyu
chihyu am 29 Okt. 2021
Geschlossen: chihyu am 30 Okt. 2021
The t variable is the data I want to analyze. Click on the t variable to see that multiple table files are required. And my studio wants to import all the data of row =6,8,10 column =4 in the table.
My job is as follows (mtxDISP), if you just want row=6, column=4 data, I only need table2array( t{j}(6,4) ). j is how many tables I have
But there was an error in my writing, and I don’t know how to deal with it at the moment.
clc;
Total_Ndic = num_files-1; % data points
fprintf('**** input dof position such as [6,4; 10,4; ...] **** \n');
dof_position = [6,4; 4,4; 10,4];
[m,n] = size(dof_position);
dof = m; % displacement column number
mtxDISP = zeros(Total_Ndic,dof);
for i=1:dof
for j=1:Total_Ndic
mtxDISP(j,i) = table2array( t{j}dof_position(i,:) );
end
end
fps= input('frame rates: ');
figure();
step = linspace(0,Total_Ndic,Total_Ndic);
vecTime = step./4000;
plot(vecTime,mtxDISP(:,1));
xlabel('Time (sec)')
ylabel('amplitude (pixel)')
figure();
plot(vecTime,mtxDISP(:,1));
xlabel('frames')
ylabel('amplitude (pixel)')
error :
Error using DIC_post-processingCODE (line 39)
Subscripting a table using linear indexing (one subscript) or multidimensional indexing (three or more subscripts) is not supported. Use a row subscript and a variable subscript.

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by