关于利用trapz对数组进行积分。

조회 수: 3 (최근 30일)
jukknceng
jukknceng 2023년 5월 25일
답변: pgerden 2023년 5월 25일
程序如图利用trapz函数对数组进行积分
但是一直报错:
“错误使用 permute
ORDER 包含无效的 permutation 索引。”
希望好心人指导一下,感谢!

채택된 답변

pgerden
pgerden 2023년 5월 25일
这样就好了
从2开始积分
t=-18.321:0.0022365:18.321;
platform_H=100;
platform_H_error=normrnd(0,1,1,16384)+platform_H;
Dslow_vector=ones(1,16384);
for m=2:16384
t_1=t(1:m);
platform_H_error_1=platform_H_error(1:m);
Dslow_vector(m)=trapz(t_1,platform_H_error_1);
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 数值积分和微分에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!