MATLAB Answers

0

how can i answer how to plot signal, and its frequency and phase. Then add a noise signal and plot the same parameters?

NOR AZRIE NORZARI さんによって質問されました 2019 年 10 月 14 日
最新アクティビティ NOR AZRIE NORZARI さんによって コメントされました 2019 年 10 月 14 日
Given V1 = 2cos(2π(10)t + 1.5π) + 6 cos(2π(30)t) + 5 cos (2π)t + π)

  0 件のコメント

サインイン to comment.

1 件の回答

回答者: Jon
2019 年 10 月 14 日
編集済み: Jon
2019 年 10 月 14 日
 採用された回答

Here are some ideas to get you started
If you just want to visualize V1 as a function of time you can assign a vector of values for over the range of interest,
for example using
tfinal = 10; % or what ever you choose as your final time
t = linspace(0, tfinal)
Then write an expression evaluating v1 for each value of t, something like (
v1 = 2*cos(2*pi*10*t + 1.5*pi) + t*cos(...% I think you can follow from there
And then you can use the plot command.
plot(t,v1)
You can add random noise to the signal using something like (variable names are up to you)
noiseMagnitude = 20; % or whatever value you choose for how "big" the noise is
v1Noisy = v1 + noiseMagnitude*randn(size(t))
and then plot that again using the plot command, you could also plot both the original and noisy signal at the same time using
plot(t,v1,t,v1Noisy)
I'm not quite sure what you mean by plotting the frequency and phase, but sounds like you may want to investigate the use of the fft command to do a fourier transform analysis (although you can also determine it analytically from the function you are given)
That should get you started. If you are still stuck after you have tried to code this, then please attach your code, and clearly state what problem you are having. Copy and paste the full text of any error messages you are receiving if that is where you are stuck.
For future postings it is better to just briefly describe the problem you are having in the subject line and then ask the question in the body

  1 件のコメント

tq so much

サインイン to comment.



Translated by