想计算y在区间9-10上的最大幅值,有大佬会改一下么。
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
clc
clear
a=[]
x=0:1:10
y=sin(x)
a=[a,(max(y(end-1:end,1))-min(y1(end-1:end,1)))/2]
a
%出错显示,下标索引必须为正整数类型或逻辑类型。
0 Commenti
Risposta accettata
cgjsrey
il 21 Mag 2023
仅供参考
clc
clear
a=[];
x=0:1:10;
y=sin(x);
a=[a,(max(y(1,end-1:end))-min(y(1,end-1:end)))/2]
a
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!