How I can to realize this function

5 visualizaciones (últimos 30 días)
Gertruda Radomir
Gertruda Radomir el 7 de Nov. de 2020
Comentada: Rena Berman el 7 de Mayo de 2021
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 comentarios
Rik
Rik el 7 de Nov. de 2020
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 el 7 de Mayo de 2021
(Answers Dev) Restored edit

Iniciar sesión para comentar.

Respuestas (2)

KSSV
KSSV el 7 de Nov. de 2020

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


Alan Stevens
Alan Stevens el 7 de Nov. de 2020
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])

Categorías

Más información sobre Historical Contests en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by