Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

No SIM 4:12 PM 80% a bb9.stmarytx.edu Problem 1) Write a script to calculate the

ID: 1715582 • Letter: N

Question

No SIM 4:12 PM 80% a bb9.stmarytx.edu Problem 1) Write a script to calculate the sum of the following geometrie series when N = 1000 and r-1/2 N 10000 and r = I/2 N 1000 and r = 0.99 N = 10000 and r = 0.99 Explain the results obtained. Problem 2) Given the matrix 112 54 21 36 27 19 16 78 65 43 38 91 58 3 18 x=[12 54 21 36 27 19 16 78 65 43 38 91 5 8 3 18], Find all the indices i such that o xiS 30, o 30 50. Find all the elements of x (the values of x) such that o 30 s x S 50. Problem 3) Given the matrix 10 12 36 78 92 11 14 57 74 91 x 40 38 29 72 81 34 27 39 48 62 10 14 18 82 73 Construct another matrix anp with all non-prime numbers in x set equal to 0

Explanation / Answer

(1)

clear all
close all
clc
N=input('Enter N value : ');
r=input('Enter r value : ');
S=0;
for i=0:N
    So=power(r,i);
    S=So+S;
end
S

Result:

Enter N value : 3
Enter r value : 0.5

S =

   1.8750

>>

Enter N value : 1000
Enter r value : 0.5

S =

     2

>>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote