Borrar filtros
Borrar filtros

Compute the following using elementwise operations on a vector:

1 visualización (últimos 30 días)
James M.
James M. el 23 de Sept. de 2021
Comentada: James M. el 23 de Sept. de 2021
X= (1/2^0)+(1/2^1)+(1/2^2)+...(1/2^100)
  4 comentarios
Steven Lord
Steven Lord el 23 de Sept. de 2021
Since you're relatively new to MATLAB, I suggest you start with the free MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB. It's supposed to take about two hours and should teach you the basic skills you should need for your assignments. Sections 4 through 6 seem most applicable to this assignment you've posted.
James M.
James M. el 23 de Sept. de 2021
Awesome. I'll check it out! Thanks for the information.

Iniciar sesión para comentar.

Respuestas (1)

Shayan Sepahvand
Shayan Sepahvand el 23 de Sept. de 2021
Hi,
X = 0;
for i = 1:100
X_t = 1/(2^(i-1));
X = X_t + X;
end
X
  1 comentario
John D'Errico
John D'Errico el 23 de Sept. de 2021
Please do not do what is an obvious request to do their homework. This does not help the student, who learns nothing more than that there is always someone willing to do their job for them.

Iniciar sesión para comentar.

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by