how to do this array problem matlab

1 visualización (últimos 30 días)
HIGH
HIGH el 22 de Mzo. de 2015
Comentada: HIGH el 22 de Mzo. de 2015
z=[2j;-pi/2;3]
https://www.dropbox.com/s/kdttn8irinpf8xr/Screenshot%202015-03-21%2023.06.02.png?dl=0
sqrt(zk) where zk is the kth element of array z.
  2 comentarios
Geoff Hayes
Geoff Hayes el 22 de Mzo. de 2015
HIGH - please describe in detail what problem you are attempting to solve. Instead of posting a link to an image, describe it in worlds.
HIGH
HIGH el 22 de Mzo. de 2015
Editada: HIGH el 22 de Mzo. de 2015
we have to specify the Matlab command that we would enter in order to evaluate the indicated sigma quantity . I cannot type it the symbols. that is why I posted the link to the question. Sorry I am new to this forum.

Iniciar sesión para comentar.

Respuesta aceptada

Naty S
Naty S el 22 de Mzo. de 2015
Hey HIGH If I understand you correctly you want to sum the square value of a vector. Check the functions sum and sqrt http://www.mathworks.com/help/matlab/ref/sum.html?searchHighlight=sum http://www.mathworks.com/help/matlab/ref/sqrt.html?searchHighlight=sqrt
d=sum(sqrt(z(k:3)))
  1 comentario
HIGH
HIGH el 22 de Mzo. de 2015
is this right too?
d=sum(sqrt(z(1:3)))
because when I did it your way it asks me to define k. so I typed k=(1:3).. then it gave me 2.7321 + 2.2533i... also when I did d=sum(sqrt(z(1:3))), it gave me the same answer. both ways are correct it seems?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by