2017-02-06 5 views
-4

私はMatlabの新機能です。下の画像のように、定数、波動関数、および他の定数を含む信号をどのように描くことができますか?区分的に一定の区分的な波動関数を描く方法

signal

+1

簡単 '関数imshow(関数imread( 'https://i.stack.imgur.com/5anQH.png','png'))'。冗談はさておき、あなたがしたいこと、試したこと、失敗したことについて、より多くの情報を提供する必要があります。あなたの質問は今のように広すぎます –

答えて

0
figure % create a figure 
hold on % Keep plot when making more plots 

% first section 
plot([0,9],[2500 2500],'k') % plot a constant line from 0-9 where y = 2500 

% second section 
x = linspace(0,9); % create array from 0 to 9 in 100 points 
f = @(x) 2500 + sin(x*pi/9)*2500; % create wave function, using x 
plot(x+9,f(x),'k') 

% third section 
plot([18,24],[2500 2500],'k') % plot a constant line from 18-24, y = 2500 

% Change y limits 
ylim([0 5000]) 
関連する問題