writing data of formula

It is my part of the codes. As such, it gives all Z values. And I want to write imag and real Z but everytime matlab gives me just last value of Z. What can I write all values of imag Z and real Z.

Respuestas (1)

Kunal Kandhari
Kunal Kandhari el 17 de En. de 2023

0 votos

Hi
Z = (sin(k)/x_2(s)) * ((cos(phi(k)) + (1j*(sin(phi(k))))))
The variable Z just stores the calculated value in every iteration of code, if you want to store the values of all the iterations, you need to change it to array by doing the following modification:
Z(s) = (sin(k)/x_2(s)) * ((cos(phi(k)) + (1j*(sin(phi(k))))))

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Preguntada:

el 26 de Dic. de 2022

Respondida:

el 17 de En. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by