Write a matlab script that solve system of linear equations

Assignment Help MATLAB Programming
Reference no: EM131221030

1. Write a Matlab script that will solve the system of linear equations shown below. This can be done by solving for the vector of unknowns (X) in the equation AX=B where A is the coefficient matrix and B is the vector on the right-hand side. In the script, also include code to verify that the result is correct.

3x - 2y = -1
-x -6y = -5

Figure 1: Results (X) and the solution to the equation to AX = B using X (stored in a variable called B2). B2 is used to verify the results.

2. Now, plot the lines for the equations in part 1. Plot the line for the 1st equation in blue and the line for the 2nd equation in green. Analyze the equations for "x" from 0 to 1 at an interval of 0.01. It should look like the plot shown. Use the data tab to verify your results. Label the "x" and "y" axes and title the figure as shown.

Figure 2: Expected plot.

3. The Fibonacci sequence is defined using the following equation:

fn = fn-1 + fn-2

Given the following initial conditions, write a function that generates the first "n" Fibonacci numbers.

f1 = 1, f2 = 2

Figure 3: Example output.

HINT: you will have to solve for "y" in each equation of part 1 Use a for-loop. Figure 3 shows an example output when n=12.

I. WHAT TO TURN IN (PLEASE READ THIS CAREFULLY)

For this HW, you only need to provide the Matlab code and the answers for the "Work Task" section. You must put the complete Matlab functions/scripts and the answers into a single MS Word doc. Your code must be in text format. Code provided as an image will not be accepted. You must label everything appropriately (i.e., label the code and work task sections). If I can't understand your answers or code, I will assume it is incorrect. Also, please include the cover page in your Word doc.

Attachment:- Mat_Lab_hw.pdf

Reference no: EM131221030

Questions Cloud

Research paper on change in human resource development : For the final assignment of this course, you will write a research paper on change in a human resource development (HRD) organization that you work for, or would like to work for.
Write an evaluator for the language of sums and products : We can use structures to represent syntax trees in Prolog. For example, the expression, (3 * 4) + (5 + 6) can be represented by the syntax tree: sum(prod(num(3), num(4)), sum(num(5), num(6))) Write an evaluator for the language of sums and products
Country-el salvador : 1. The relationship over the last 5 years between your country's trade picture and the country's currency exchange rate. 2. The relationship over the last 5 years between your country's Foreign Direct Investment picture and the country's currency e..
Behaviorin extended organization : ApplyingFigure 14.2to what the video tells us about Numi'spolitical behaviorin this extended organization, summarize the role and nature of ethical considerations in this behavior.
Write a matlab script that solve system of linear equations : Write a Matlab script that will solve the system of linear equations shown below. This can be done by solving for the vector of unknowns (X) in the equation AX=B where A is the coefficient matrix and B is the vector on the right-hand side.
Marguerite received nonqualified stock options : Marguerite received nonqualified stock options (NQSOs) with an exercise price equal to the FMV at the date of the grant of $22. Marguerite exercises the options 3 years after the grant date when the FMV of the stock was $30. Marguerite then sells ..
Diversity in the workplace : Upon completion of this activity, you will be able to: Identify what diversity is and why it is important to have a diverse workforce. Evaluate strategies for ensuring that employee diversity is managed effectively.
Depositor at melvins bank : Suppose you know that Melvin's other depositors plan to keep their money there. Should you do the same or withdraw your money and deposit it elsewhere?
Find the length of third side and the area of the triangle : You are given two sides of a triangle, a = 4.5 and b=6. The angle between them is 35 degrees. Write a script to find the length of the third side and the area of the triangle.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Create matlab function to plot the rotation of a wheel

Create Matlab function to plot the rotation of a wheel without sleeping. Plot the trajectory of any point on the wheel.

  Matlab m-script that will generate a damped sinusoid

1.) Write a MATLAB m-script that will generate a damped sinusoid (frequency = 440 Hz) with a time constant of 0.25 sec. Set the time axis for 0 to 6 time constants.

  Calculate the average value for each of the loads

Performs curve-fits of all the data - Determines what type of loading has been applied based on which curve-fit is the best. 6.Demonstrates that the chosen curve-fit is the best both graphically and numerically.

  The length of hose is 275 feet and the system is to be

a system for delivering lawn fertilizer in liquid form. the nozzle on the end of the hose requires 20 psig of pressure

  Write a matlab program to analyze a patients ecg signal

Determine the Heart Rate of an ECG Recording of Unknown properties Using MATLAB - Write a MATLAB program to analyze a patient's ECG signal and provide warnings if the heart rate becomes either dangerously low or dangerously high.

  Write a user defined function

Write a user defined function FindFrequency which inputs are a time and a wave elevation vector and output the approximated wave frequency (fappr=FindFrequency(t,eta)).

  What is the max and minimum value of the given vector

What is the max and minimum value of the above vector? In what elements are these values found? Find the square root, cube root and 7th root of this vector using a single operation.

  Find the laplace transforms

Find the Laplace transforms of the following functions - Find the partial fraction

  Make a nichols plot of your systems response.

MECH 436 - Applied Controls. For this laboratory you will some of the tools from the Control Systems Toolbox in MATLAB to help visualize a systems open and/or closed loop response. Make a Nichols plot of your systems response. Make a Zero-Pole plot..

  Matlab program to add all the elements of a matrix

Create a new vector, named vector2, containing only the elements in the even numbered positions from vector1. For example, if vector1 is [0 1 2 3 4 5 6], vector2 should be [1 3 5].

  Create a script file for conversion of temperature

Create a script file for conversion of temperatures. Use the input function or menu function to allow the user to enter temperature scale of Fahrenheit, Celsius, Kelvin, or Rankine. If you are using the input function, tell the user to enter F for Fa..

  Does technology influence gambling

Can you conclude that online gambling is more prevalent among individuals who are under the age of 30 at a level of significance of 0.05?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd