fifth element in vector

19 visualizaciones (últimos 30 días)
shaimaa masarwa
shaimaa masarwa el 15 de Nov. de 2018
Editada: madhan ravi el 15 de Nov. de 2018
a) Define vector x with the elements: (1,2 ,4,-2)
b) Define vector x1 which contains all the odd numbers between 1 and 100
c) Define vector x2 which contains all even numbers between 2 and 100
d) Define vector y whose elements range between 0 and 20 with a step size of 2
e) Define vector y1 whose elements are the same as y but in reverse order
f) Define vector y2 whose elements are y1 to which the value of the fifth element in vector y is
added.
g) Define vector z whose elements are the square root of the vector y (use y.^0.5), what are the
values of the 5th, 6th and 15th elements display the elements with the highest accuracy using the
command format long.
so far this is what i've done:
a) x=[1,2 ,4,-2];
b) x1=1:2:100;
c) x2=2:2:100;
d) y=0:2:20;
e) y1=fliplr(y);
can anyone pls help me solve the f and g question ?

Respuesta aceptada

madhan ravi
madhan ravi el 15 de Nov. de 2018
Editada: madhan ravi el 15 de Nov. de 2018
  1 comentario
shaimaa masarwa
shaimaa masarwa el 15 de Nov. de 2018
tbh i'm new to all matlab thing, so i still didnt got the answer . |:(

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical 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