Undefined function 'trend' for input arguments of type 'double'
1 回表示 (過去 30 日間)
古いコメントを表示
Hai everyone, i facing some problem with the script. I'm using trend function but had an error like this
Undefined function 'trend' for input arguments of type 'double'.
Error in script_msl_v2 (line 14)
ud=trend(data{:,4:end},[],2,'omitnan');
with this script
clear;
clc;
format longG;
f = dir('D:/full_Data_Cryosat_c2p0004.txt');
A=1:length(f);
D = f(A).name;
ff=D(:,19:25)
data=readtable(D,'HeaderLines',0);
rata2=mean(data{:,4:end},2,'omitnan');
standar_deviation=std(data{:,4:end},[],2,'omitnan');
ud=trend(data{:,4:end},[],2,'omitnan');
ref=data{:,1};
lat=data{:,2};
lon=data{:,3};
msl=[ref lat lon rata2 standar_deviation]
file_name_msl=['msl_' ff '.txt']
dlmwrite(file_name_msl, rata2, 'delimiter', '\t');
file_name_data=['data_msl_' ff '.txt']
dlmwrite(file_name_data, msl, 'delimiter', '\t','precision',10);
What should i do to solve that?
Thanks for helping
0 件のコメント
回答 (1 件)
Dave B
2021 年 10 月 23 日
If you're trying to use a function you got from elsewhere (e.g. downloaded from file exchange) you likely need to add the directory containing that function to the MATLAB path. For an easy graphical interface for managing the path, just run: pathtool
If you're expecting trend to be a builtin function in MATLAB, I think it's not...what were you expecting it to do?
which trend
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!