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!