Error: Undefined operator './' for input arguments of type 'table'
Show older comments
I have a +330,000,000 row .txt file (attached a 1000 row sample .txt) that I am attempting to perform a linear regression on using the following script:
Clm = ('sample.txt');
t = readtable(Clm, 'Delimiter','comma');
>> x = t(:,2);
>> y = t(:,4);
format long
b = x./y
yCalc1 = b*x;
scatter(x,y)
hold on
plot(x,yCalc1)
xlabel('Pressure')
ylabel('Depth')
title('Pressure vs Depth')
grid on
I get the following return error:
Undefined operator './' for input arguments of type 'table'.
I have tried
b = divide(x,y)
and
b = x/y
neither alternative works.
I also get the same error for the multiplication on:
yCalc1 = b*x;
1 Comment
per isakson
on 29 Dec 2018
Accepted Answer
More Answers (0)
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!