Compute the following using elementwise operations on a vector:

X= (1/2^0)+(1/2^1)+(1/2^2)+...(1/2^100)

댓글 수: 4

John D'Errico
John D'Errico 2021년 9월 23일
편집: John D'Errico 2021년 9월 23일
Please stop poting your homework assignment qiuestions. (This now being the second one you posted.) Start to learn MATLAB. You will not learn until you make an erffort. Go through the onramp tutorials. If not, then look at YouTube, where you will find free courses taught to get you started. MAKE AN EFFORT.
James M.
James M. 2021년 9월 23일
편집: James M. 2021년 9월 23일
I sincerely apologise for this behaviour. I immediately thought that this "Ask" page was directly for question answering and the like. It's just that our professor immediately went onto these type of questions without explanation. I understand the question completely, but implementing them with code is different. This isn't my forte, but a course I need a take for university. Thanks again for the clarification, and other possible help options (?). I'll make a damn effort.
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.
Awesome. I'll check it out! Thanks for the information.

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

답변 (1개)

Hi,
X = 0;
for i = 1:100
X_t = 1/(2^(i-1));
X = X_t + X;
end
X

댓글 수: 1

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.

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

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2021년 9월 23일

댓글:

2021년 9월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by