How I can to realize this function

Hello to everyone!
I need help in solving this function, please!
I tried to solve it with different methods, but nothing worked.
here is my last solution which doesn't work either.

3 件のコメント

John D'Errico
John D'Errico 2020 年 11 月 7 日
When you edit your question away, you insult those who apparently wasted their time in answering your question, since now their answer is useless to anyone else.
Rik
Rik 2020 年 11 月 7 日
Unfortunately for Vladislav Tepper, Google keeps a cache. So If you want to cheat, you will have to be a bit more cunning. Or not post on a public forum.
How I can to realize this function
Hello to everyone!
I need help in solving this function, please!
I tried to solve it with different methods, but nothing worked.
here is my last solution which doesn't work either.
Rena Berman
Rena Berman 2021 年 5 月 7 日
(Answers Dev) Restored edit

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

回答 (2 件)

KSSV
KSSV 2020 年 11 月 7 日

0 投票

n = 1:20 ;
y = zeros(size(n)) ;
y(n<=5) = n(n<=5).^2 ;
stem(n,y)

Alan Stevens
Alan Stevens 2020 年 11 月 7 日

0 投票

Use indexing:
Parabula = @(n) n.^2;
n = -2:6;
y = Parabula(n);
y(n<1 | n>5) = 0;
stem(n,y)
axis([-10 10 0 30])

1 件のコメント

Gertruda Radomir
Gertruda Radomir 2020 年 11 月 7 日
Thank you very much!

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

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

タグ

質問済み:

2020 年 11 月 7 日

コメント済み:

2021 年 5 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by