Subscript a table error while indexing
4 views (last 30 days)
Show older comments
Hello, I have a table that has a time column and 6 columns of temperature data at different depths in a streambed without any headers. I am getting the error:
You cannot subscript a table using linear indexing (one subscript) or multidimensional indexing
(three or more subscripts). Use a row subscript and a variable subscript.
I am using this line of code>>
seep = vfluxformat(seep03292018vflux(:,1:1), seep03292018vflux(:,2:7),[0.00 0.10 0.20
0.50 0.75 1.0]);
Does anyone have any idea how to remedy this? I am a MATLAB novice.
Thanks,
5 Comments
Walter Roberson
on 23 Jul 2018
Please check whether your numeric array should all be on one line, or if it is intended to be a 2 x 3 numeric array.
You appear to be using vflex2, which is defined as requiring a scalar or row vector for its third parameter, but you are passing a 2 x 3 array.
The MATLAB code
[0.00 0.10 0.20
0.50 0.75 1.0]
is the same as
[0.00 0.10 0.20;
0.50 0.75 1.0]
which is the same as
[0.00 0.10 0.20; 0.50 0.75 1.0]
which is a 2 x 3 array.
Answers (0)
See Also
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!