In: Electrical Engineering
%% Matlab code to calculate the sum of the series
%
sum=0; % initilalizing the sum value with '0'
for k=1:1:15 % find the sum of series for k= 1 to 15
S=5*k^2-2*k; % expression of the series, for k
sum=sum+S; % adding the value of series at k to the previous
sum
end % end of the for loop
sum=sum
%% Matlab code to find the number of numbers to be in series, so
that
% the sum is greater than a value
%
sum=0; % initializing the sum value with '0'
k=0;
while sum<10000 % checkk wether the sum is exceeding 10000, if
not it
% will continue to add the next number
k=k+1; % if the sum doesnt exceed 10000, then k will increase
% to next number
S=5*k^2-2*k; % expression of the series, for k
sum=sum+S; % adding the value of series at k to the previous
sum
end % end of the while loop. exits when sum exceeds 10000
k=k
% now the k value will be the number of terms required for the sum
of
% the series is exceeds ten thousand