How to solve the Operator '-' is not supported for operands of type 'table'?
10 ビュー (過去 30 日間)
古いコメントを表示
clc;
clear all;
close all;
format long g;
load('LS_inclination.mat')
%% Considering the 4corner or last column as z axis
z = LSinclination(:,5);
n = size(z,1);
% Computing the arithmetic mean or average value
%mean_value = mean(z);
mean(LSinclination{:,5});
intLogical = mod(LSinclination{:,5},1)==0 ;
mean_value= mean(LSinclination{intLogical,5});
% Computing the experimental variance and standard deviation
s2qk = sum((z-mean_value).^2)/(n-1);
sqk = sqrt(s2qk);
I have a data of laser scanner as attached and code file which shows some error mention in the comment. How can i fix it? Please explaing what does this error means?
0 件のコメント
採用された回答
Duncan Po
2021 年 6 月 14 日
z should be a matrix instead of a table. z is defined using parentheses indexing in your code:
z = LSinclination(:,5);
This returns a table. Later on, you try to do math on z, and in general math on tables are not supported. Instead, you want to use braces indexing to extract the data as an array:
z = LSinclination{:,5};
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!