NPTEL Course Offered by IIT Madras Computer Methods of Analysis of Offshore Structures Assignment - 0
NPTEL Course Offered by IIT Madras Computer Methods of Analysis of Offshore Structures Assignment - 0
2. Write a computer program using MATLAB to solve the system of equations given below:
a) 4x + 3y + z = 9; x – 4y + 10z = 0; 2x + 3y - 5z = 4
(Hint: Frame the equations in matrix form AX=B, then X can be calculated by X=A-1B.Use ‘inv’
command in MATLAB to get A-1)
3. Write a computer program using MATLAB to the following curves in a single figure with
functions y = 4x2+2x-3 and z = 3x – 2, where x varies from -5 to 5.
(Hint: Use ‘plot’ and ‘hold’ command)
4. Write a MATLAB program to find the sum of elements in a row vector {A} using ‘for’
statement.
{A} = {2 5 7 4 5 6 9 5 1 7 5 3}. Also find the average and print the results.
(Hint: Map the elements by its row and column number positions)