Question

Solve in Matlab by using Script file:

Problem 4: Write a user-defined MATLAB unction that calculates the determinant of a 3x3 matrix by using the formula: A22 A23 11 A32 A33 A23 A12 A31 A33 21 A For the function name and arguments use d3-det3by3 (A), where the input argument A is the matrix and the output argument d3 is the value of the determinant. Write the code of det3by3 such that it has a subfunction that calculates the 2x2 determinant. Use the function to calculate the determinants of a few 3x3 matrices.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

ATLAB function ca 3#3 matrix that calculates te detmtnant mula A22 A23 A A23 32 33 A3i A33 A 12 t A 13 A31 3 1 The fewing s t-that calculates determinant o Usng tematic al -funcon det 3 by 3 CA) aA2,2) A 2,3) A (3,2) A (3,3) (2, A (2,2),)(32)2 det 2.det y3 CA) Thus,the dete Consider the follousing matr ix 2 Calculate the d-terminan+ the malrix the fucet call as フ> de13 by

Add a comment
Know the answer?
Add Answer to:
Solve in Matlab by using Script file: Problem 4: Write a user-defined MATLAB unction that calculates...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • linear algebra Let V (71, 72, 3}, where 71 73=(2,0,3). (1,3,-1), 2 = (0, 1,4), and...

    linear algebra Let V (71, 72, 3}, where 71 73=(2,0,3). (1,3,-1), 2 = (0, 1,4), and (a) Prove: V is a basis. (b) Find the coordinates of (b, b2, bs) with respect to V = {71, U2, 3,}. (c) Suppose M and M' are matrices whose columns span the same vector space V. Let b be the coordinates of relative to M. Write a matrix equation that gives b', the coordinates of relative to M'. (Your answer should be a...

  • Write a matlab script(using only matlab) for this. Write a script to solve the following problem:...

    Write a matlab script(using only matlab) for this. Write a script to solve the following problem: Ask the user for the length and the width of a rectangle. These need to be passed to a function. The function is to calculate and return the area and the perimeter of the rectangle. The area is the length times the width and the perimeter is 2 times the length and 2 times the width. Make sure to suppress all output from the...

  • use python and one loop to solve this problem Q6: Secondary Trace You are given a...

    use python and one loop to solve this problem Q6: Secondary Trace You are given a function that takes a square array, matrix, and returns the sum of the secondary diagonal values for matrix. This function employs a nested 2D for-loop. Write a function secondary trace single loop that solves the same problem using only one for-loop. For example, on the picture below secondary diagonal consists of values: a03, a12, a21, a30. a00 a01 a02 a03 a10 all a12 a13...

  • Write Matlab script for computing inverse of a matrix using LU decomposition/factorization. You are not allowed...

    Write Matlab script for computing inverse of a matrix using LU decomposition/factorization. You are not allowed to use the Matlab’s lu function.

  • USING MATLAB Write a script that asks the user to input a sentence. It then replaces...

    USING MATLAB Write a script that asks the user to input a sentence. It then replaces all instance of 'he', 'she', 'He', or 'She' with 'Mr. Meseeks' and prints out the new sentence. . HINT: Use 'strrep' and 'lower' function.

  • Using MATLAB. Create a script file that calls a user-defined function within a for/end loop to...

    Using MATLAB. Create a script file that calls a user-defined function within a for/end loop to symbolically compute the derivative of ln(x) on the interval from -5 to 5, containing 100 data points. Your script file should output a plot of the derivative of ln(x) (taken from your function) vs x. Use a line with circular markers for the plot and include a grid and appropriate labels. The user-defined function should 1. Receive a single x value as input. 2....

  • Use MATLAB to solve this problem. Thank you. Upload the assignment to CANVAS, it should include...

    Use MATLAB to solve this problem. Thank you. Upload the assignment to CANVAS, it should include two things: the PDF and the zipped folder. Late assignments are not accepted. For the questions below, do not create the arrays or matrices by hand. Instead, use built-in MATLAB functions and shorthand notations. Otherwise, no points will be given. 1) Create a function called my product that computes the multiplication of the numbers in any vector using a while loop. The function should...

  • Matlab Question. Please be detailed Write a user-defined function that performs LU decomposition (using Gauss Elimination...

    Matlab Question. Please be detailed Write a user-defined function that performs LU decomposition (using Gauss Elimination without partial pivoting) of a square matrix. Do not use built-in MATLAB functions lu( ), inv(), \, linsolve(). Matrices (in [A]*{x}={B} form) A=[15 -3 -1; -3 15 -6; -4 -1 12] B=[3800; 1200; 2350] Given code lines: function[L,U]=myLUFact_username(A) [m,n]=size(A); %numbers of rows/comlumns of A assert(m==n, 'A should be a square matrix');

  • Using Matlab or Octave, I do not know how to write the script for this problem,...

    Using Matlab or Octave, I do not know how to write the script for this problem, please help. Must match sample output 5. Consider a 3 x 3 matrix given by A = 01 012 013 az az 633 ( dai 632 033 The trace of A is defined as tr(A)=2au. Given another 3 x 3 matrix bu bı2 bia B- bi brz bra | bgi bz2 by it can be shown that trAB') = tr(AB). Write a script that...

  • Function driver and script file please 4) The polynomial f (x)-0.0074x*-0.284x3+ 3.355x2 12.183x +5 has a...

    Function driver and script file please 4) The polynomial f (x)-0.0074x*-0.284x3+ 3.355x2 12.183x +5 has a real root between 15 and 20. Apply the Newton-Raphson method to this function using an initial guess of xo-16.15. Explain your results. 5) Use the roots MATLAB function to find the roots of the polynomial x x-1-0. Compare your answer to the answer you derived in in question 1. 6) Write the following set of equations below in matrix form. Use MATLAB to solve...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT