How to write the script file for the following questions.

1 Ansicht (letzte 30 Tage)
WEN SHENG SHENGNG
WEN SHENG SHENGNG am 8 Nov. 2018
Kommentiert: Rena Berman am 12 Nov. 2018
  2 Kommentare
Stephen23
Stephen23 am 8 Nov. 2018
@WEN SHENG SHENGNG: do you have a specific question for us? So far you just copied some homework assignment into your question, but did not ask us anything apart from "how to write..."
What have you tried so far?
Rena Berman
Rena Berman am 12 Nov. 2018
(Answers Dev) Restored edit

Melden Sie sich an, um zu kommentieren.

Antworten (2)

madhan ravi
madhan ravi am 8 Nov. 2018

Dimitris Kalogiros
Dimitris Kalogiros am 8 Nov. 2018
clearvars; clc; close all;
syms n
% s=1/2 + 1/2^2 + 1/2^3 + 1/2^4 +...
N=10;
S=symsum(1/(2^n), n, 1, N)
% even terms
Ne=5;
Se=symsum(1/(2^(2*n)), n, 1, Ne)
% odd terms
No=5;
So=symsum(1/(2^(2*n-1)), n, 1, No)

Kategorien

Mehr zu Particle & Nuclear Physics finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by