Let x=[2 4 6 8 10] and y=[1 3 5 7 9]. Compute for the vector z whose elements are equal to z= (xy+ y/x)/[(x+y)]^((y-x)) + 10^(x⁄y)

9 visualizaciones (últimos 30 días)
This is my answer:
x = [2 4 6 8 10];
y = [1 3 5 7 9];
z = (((x.*y)+(y./x))/((x+y).^(y-x)))+10.^(x./y)
z = 195.4683 117.0126 111.3172 109.3632 108.3838
Can somebody confirm if this is correct? Or is there something that I need to change?

Respuesta aceptada

Alan Stevens
Alan Stevens el 21 de Sept. de 2021
You need
z = (((x.*y)+(y./x))./((x+y).^(y-x)))+10.^(x./y)
% another dot here ^
  2 comentarios
John Doe
John Doe el 21 de Sept. de 2021
So the answer will be like this?
>> x = [2 4 6 8 10];
>> y = [1 3 5 7 9];
>> z = (((x.*y)+(y./x))./((x+y).^(y-x)))+10.^(x./y)
z =
1.0e+03 *
0.1075 0.1108 0.3550 0.8670 1.7400

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by