Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to import specific data in multiple tables by table2array command

조회 수: 2 (최근 30일)
chihyu
chihyu 2021년 10월 29일
마감: chihyu 2021년 10월 30일
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.

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by