Azzera filtri
Azzera filtri

All input arguments must be tables error

11 visualizzazioni (ultimi 30 giorni)
HW
HW il 26 Mar 2020
Risposto: Guillaume il 26 Mar 2020
I am new to use Matlab and runing the folloing code but turns out the error "All input arguments must be tables"? Any suggestion would be greatly appreciated. Thanks.
(NT1,T1,NT2,T2 are all 7*1 matrix)
>> A = horzcat(NT1,T1,NT2,T2);
>> C=[A(1,1) A(1,2) A(1,3) A(1,4) 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 A(1,1) A(1,2) A(1,3) A(1,4) 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 A(1,1) A(1,2) A(1,3) A(1,4) 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 A(1,1) A(1,2) A(1,3) A(1,4)
A(2,1) A(2,2) A(2,3) A(2,4) 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 A(2,1) A(2,2) A(2,3) A(2,4) 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 A(2,1) A(2,2) A(2,3) A(2,4) 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 A(2,1) A(2,2) A(2,3) A(2,4)
A(3,1) A(3,2) A(3,3) A(3,4) 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 A(3,1) A(3,2) A(3,3) A(3,4) 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 A(3,1) A(3,2) A(3,3) A(3,4) 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 A(3,1) A(3,2) A(3,3) A(3,4)
A(4,1) A(4,2) A(4,3) A(4,4) 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 A(4,1) A(4,2) A(4,3) A(4,4) 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 A(4,1) A(4,2) A(4,3) A(4,4) 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 A(4,1) A(4,2) A(4,3) A(4,4)
A(5,1) A(5,2) A(5,3) A(5,4) 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 A(5,1) A(5,2) A(5,3) A(5,4) 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 A(5,1) A(5,2) A(5,3) A(5,4) 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 A(5,1) A(5,2) A(5,3) A(5,4)];
%%
All input arguments must be tables.

Risposte (1)

Guillaume
Guillaume il 26 Mar 2020
"NT1,T1,NT2,T2 are all 7*1 matrix"
Clearly not! At least one of them is a table. If you concatenate something with a table, as the error tells you all the somethings must be a table.
You can see what class the variables by looking at the class column in the output of:
whos NT1 T1 NT2 T2

Categorie

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

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by