Matlab:
Write a program that calculates and stores in a vector the results of the sum 9 + 99 + 999 + 9999 + .... for any number of components.
PROGRAM FOR GIVEN QUESTION:
%matlab program to find the sum of
%the series 9+99+999+9999+....
n=input('enter a number upto which you need sum:');
sum=0;
vector=[];
j=9;
for i=1:n
sum = sum + j;
vector=[vector j];
% Appending a 9 at the end
j = (j * 10) + 9;
end
disp(vector)
fprintf('sum of %d numbers is:%d\n',n,sum)
OUTPUT:
>> HomeworkLib
enter a number upto which you need sum:4
9
99
999 9999
sum of 4 numbers is:11106

Matlab: Write a program that calculates and stores in a vector the results of the sum...
.using while loops(matlab) Write a program to display the sum of the series [ 9 + 99 + 999 + 9999 ...] Test Data : Input the number or terms :5 Expected Output : 9 99 999 9999 99999 The sum of the series = 111105
a. write a program that calculates the sum of two numbers x and y and then the program should call the function by address and prints the sum b. write a program that stores 10 integers provided at run time in an array. the program should prompt the user for a random integer exit in the array, the value must be replaced by a-1
4. Write a MatLab program that calculates the following indefinite integrals. The program should use pretty() to display both the original integrand and the integrated result, and also us
Please write program by using MATLAB Sum elements of ‘A’ as shown and store results in an array ‘B’. Assume ‘A’ always has even number of elements. Eg A= [ 1 2 5 6 10 12] B= [ 1+12, 2+10, 5+6] Therefore output:B = [13, 12, 11]
with explanation
Write a C++ program that calculates and prints the average of several integers. Assume that the last value read with cin >> is the number 9999. For example, for an input sequence: 10 8 11 7 9 9999 The output should be 9.00
Question 9 Write a MATLAB command that stores the maximum value in the row vector x and their indices in the row vector k for matrix A.
In MATLAB write a program that given the parameters from
problem 13.171 (pg 900) that calculates the horizontal and vertical
position of the ball after it strikes point A and until it lands at
point B. Use a time increment in seconds that results in a smooth
curve. Fully document your script file including a problem
description and fully label your graph.
from vector mechanics for engineers eleventh edition (Beer,
Johnston...) chapter 13 problem number 171
8:24 PM Vector Mechanics...
You will write a program in C that multiplies a matrix by a vector, using MATLAB to check the results. Create a program in MATLAB to solve the Topic 5 "File I/O" assignment. Use any built-in MATLAB functions of your choice. Some might require you to change your input files slightly; if so, document what you did and explain why. Compare and contrast the C and MATLAB versions of your code. works in matlab
You will write a program in C that multiplies a matrix by a vector, using MATLAB to check the results. Create a program in MATLAB to solve the Topic 5 "File I/O" assignment. Use any built-in MATLAB functions of your choice. Some might require you to change your input files slightly; if so, document what you did and explain why. Compare and contrast the C and MATLAB versions of your code.
Write a program with a loop and indexed addressing that calculates the sum of all the gaps between successive array elements. The array elements are doublewords, sequenced in nonde- creasing order. So, for example, the array {0, 2, 5, 9, 10} has gaps of 2, 3, 4, and 1, whose sum equals 10.