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

  A function of the energy e of the beams

A new particle has been discovered in a lab by colliding two beams of leptons and measuring how many particles are produced as a function of the energy E of the beams. The table below gives the results.

  Write a curried function to add n

Write a curried function to add N (where N is an integer) to each item of a list.

  Design a matlab application

Design a MATLAB application that has the following features under single-phase conditions:

  Hi i attached the instructions would you guys do it by 50

i attached the instructions. ltbrgt ltbrgtwould you guys do it by 50 dollars ? ltbrgt ltbrgtit is due this friday

  Write the matlab code to set up the vector

Write the MATLAB code to set up the vector y = [2 4 3 6 2] and plot y in a pie chart. Add a legend and title to the pie chart. The legend should contain the following strings: ‘value1', value2', ‘value3', ‘value4', and ‘value5'. The title should b..

  Find the average value and the power of signal

Find the average value and the power of this signal by integrating 1/T0 v(t) and 1/T0 v2(t) respectively in the time domain, over one period. Your answer must be expressed in terms of fc and Ac only.

  Coefficients of the least squares fit

Write a Sa/Mkrus function that takes as its input the data and plots the data points and the least squares linear fit to the data. The function should also return the coefficients of the least squares fit.

  The gauss-newton method

Write up your results using our standard format. Show and discuss the results of Steps 1-3 in some detail, including the observed convergence rates of steepest descent versus the Gauss-Newton method

  Write a program to implement this process

A computer cannot store an entire function in its memory. Typically it stores the values of the function at a finite number of points. Pick values of a, b, v, N, and Δt, and write a program to implement this process. Be sure to leave a, b, v, N, an..

  Find the probability

Find the probability that more than 25 requests are received in the one minute interval by applying the central limit theorem. (Hint: apply the de Moivre-Laplace approximation)

  Determine the minimum area of the panel for an output of 1

a reversible heat engine in a satellite operates between a hot reservoir at t1 and a radiating panel cold reservoir at

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