Error: Undefined operator './' for input arguments of type 'table'
Afficher commentaires plus anciens
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 commentaire
per isakson
le 29 Déc 2018
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Tables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!