how to create function handle for conditional sine wave
古いコメントを表示
I want to create function handle that satisfies the following discrete sinusoid
n = -10:1:10;
x = sin(3*pi*n);
x(n<0) = 0 ;
x(n>5) = 0 ;
stem(n,x)
回答 (1 件)
fun = @(t) sin(3*pi*n) .* (n>=0 & n<=5);
カテゴリ
ヘルプ センター および File Exchange で Call C++ from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!