フィルターのクリア

plot sine wave with exponent

1 回表示 (過去 30 日間)
Michel
Michel 2023 年 10 月 18 日
コメント済み: Star Strider 2023 年 10 月 19 日
Hi there,
I'm trying to synthesise some data for a project I'm doing.
I'm trying to essentially get the datapoints for the f(x) = sin(2x)^3 function with a frequency of 200Hz.
I've looked into other questions here, but so far havent been able to find what I'm looking for.
I'd be really grateful for any tips or solutions. Thanks in advance!

採用された回答

Star Strider
Star Strider 2023 年 10 月 18 日
I am not certain what you are asking.
Try this —
L = 30; % Signal Length (s)
Fs = 200; % Sampling Frequency (Hz)
t = linspace(0, Fs*L, Fs*L+1)/Fs; % Time Vector
f = sin(2*t).^3;
figure
plot(t, f)
grid
xlabel('Time (s)')
ylabel('Amplitude')
title('$f(t) = sin(2\cdot t)^3$', 'Interpreter','latex')
.
  2 件のコメント
Michel
Michel 2023 年 10 月 19 日
This is perfect, thx
I'm working with eeg signals and was trying to synthesise a certain signal complex akin to a sin wave ^3, so this works nicely!
Star Strider
Star Strider 2023 年 10 月 19 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by