Error: Undefined operator './' for input arguments of type 'table'
Ältere Kommentare anzeigen
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 Kommentar
per isakson
am 29 Dez. 2018
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Tables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!