How to write the script file for the following questions.

조회 수: 1 (최근 30일)
WEN SHENG SHENGNG
WEN SHENG SHENGNG 2018년 11월 8일
댓글: Rena Berman 2018년 11월 12일
  댓글 수: 2
Stephen23
Stephen23 2018년 11월 8일
@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 2018년 11월 12일
(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.

답변 (2개)

madhan ravi
madhan ravi 2018년 11월 8일

Dimitris Kalogiros
Dimitris Kalogiros 2018년 11월 8일
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)

카테고리

Help CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by