how to find values with half of maximum from a function

2 ビュー (過去 30 日間)
Jonathan Jubran
Jonathan Jubran 2021 年 6 月 14 日
コメント済み: Jonathan Jubran 2021 年 6 月 14 日
N=10;
w=-100:0.01:100;
H_fourier_abs_1_1=abs(Wc^N./((1i*w).^N+Wc^N));
figure(311)
plot(w,H_fourier_abs_50_10)
title('fourier transform Wc=50,N=10')
xlabel('w')
ylabel('X(w)')
this is my code, and i need to find 2 that countain 1/sqrt(2) the value of the maximum of H_fourier_abs_1_1
  2 件のコメント
Scott MacKenzie
Scott MacKenzie 2021 年 6 月 14 日
Your code won't execute:
Unrecognized function or variable 'Wc'.
Jonathan Jubran
Jonathan Jubran 2021 年 6 月 14 日
Wc=10;
i forgot to add this line

サインインしてコメントする。

回答 (1 件)

Thirusabaresaan P
Thirusabaresaan P 2021 年 6 月 14 日
this one is correct i hope
N=10;
w=-100:0.01:100;
Wc=10
H_fourier_abs_1_1=abs(Wc^N./((1i*w).^N+Wc^N))
figure(311)
plot(w,H_fourier_abs_1_1)
title('fourier transform Wc=50,N=10')
xlabel('w')
ylabel('X(w)')
max(H_fourier_abs_1_1,[],'all')
to find maximum value of array or matrix use command max(A,[],'all')
max(H_fourier_abs_1_1,[],'all')
for your case the answer is infinity so no need to calculate for it
if u want to calculate for others use below command
(1/sqrt(2))*max(H_fourier_abs_1_1,[],'all')
  1 件のコメント
Jonathan Jubran
Jonathan Jubran 2021 年 6 月 14 日
this didnt help becuse it gives me the maximum number, what i need is the w that gives me max/sqrt(2)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by