Error: Undefined operator './' for input arguments of type 'table'
古いコメントを表示
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 件のコメント
per isakson
2018 年 12 月 29 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Debugging and Improving Code についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!