please help me with this question i couldn't understand it at all

2 ビュー (過去 30 日間)
anteneh  tadesse
anteneh tadesse 2018 年 12 月 29 日
コメント済み: anteneh tadesse 2018 年 12 月 29 日
·Create Step function f with a size of 2000 (1000 samples of zeros and 1000 samples of ones).
Hint: (use zeros and ones functions in matlab)
·Add a noise using randn
·Create a smoothing kernel h of [1, 1, 1, 1, 1]
Filter f with h and plot smoothed function g

採用された回答

Image Analyst
Image Analyst 2018 年 12 月 29 日
By size I think it means amplitude. So it would be something like
f = [zeros(............ , 200 * ones(.........
f = f + randn(.....................)
h = ......
g = conv(.......)
plot(g, 'b-', 'LineWidth', 2)
grid on;
Since this is your homework, finish it yourself. It's really trivial.
If you still need help, see this link
  3 件のコメント
Image Analyst
Image Analyst 2018 年 12 月 29 日
I'll do a little more but you really need to make an effort. I mean they literally tell you what h is in the question itself. Did you even look at the help for randn() and conv() or not?
f = [zeros(1, 1000), 200 * ones(...., .....)];
f = f + amplitude * randn(1, length(f));
h = [1, 1, 1, 1, 1];
g = conv(f, h, '....')
plot(g, 'b-', 'LineWidth', 2)
grid on;
amplitude is basically how much noise you want to add to f. Try different numbers from 1 to 100 or so.
There are literally only 9 characters left for you to type in, plus one line of code to assign amplitude. I've done the bulk of it for you (against forum guidelines).
If I do the last few characters, then you would be turning in my homework as your own and that would likely get you into ethical problems with your university. What I've done so far might even be too much. Be very wary of asking for homework solutions and turning them in since I've heard some professors use plagiarism detection software.
anteneh  tadesse
anteneh tadesse 2018 年 12 月 29 日
am really thankfull. thank you

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by