Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to code question 2 in Python? 1. Use the function help or the on-line help in combination with MATLAB/Octave to familiarize yourself with the

how to code question 2 in Python?

image text in transcribed

1. Use the function help or the on-line help in combination with MATLAB/Octave to familiarize yourself with the following MATLAB/Octave functions: clear, cle, who, demo, ones, zeros, eye, diag, input pause, disp, fprintf, load, save, format, plot, xlabel, ylabel, title, length, size, mean, median, std, max, min, sum, abs, sqrt, exp, cos, sin, roots, sort, hist, any, find, all, diff 2. Write a MATLAB script that makes use of all the functions listed above (note: the script does not need to do anything useful) 3. Write the MATLAB code to construct the following matrices using the functions diag, ones, zeros, eye, the colon operator ".", and the transpose operator 10 0 0 10 Note Matrix A must be generated using only three lines of code and only using the function diag, the colon operator, and the transpose operator. Matrix M must be generated using only one line of code and using only the functions eye, zeros, and ones 4. Compute a list of the first 10 factorials (1!, 2!,..., 10!) using the function cumprod. The output should look like the following and be computed using a single line of MATLAB code. >line of code [enter 2 2 24 120 720 5040 40320 362880 10 3628800 1. Use the function help or the on-line help in combination with MATLAB/Octave to familiarize yourself with the following MATLAB/Octave functions: clear, cle, who, demo, ones, zeros, eye, diag, input pause, disp, fprintf, load, save, format, plot, xlabel, ylabel, title, length, size, mean, median, std, max, min, sum, abs, sqrt, exp, cos, sin, roots, sort, hist, any, find, all, diff 2. Write a MATLAB script that makes use of all the functions listed above (note: the script does not need to do anything useful) 3. Write the MATLAB code to construct the following matrices using the functions diag, ones, zeros, eye, the colon operator ".", and the transpose operator 10 0 0 10 Note Matrix A must be generated using only three lines of code and only using the function diag, the colon operator, and the transpose operator. Matrix M must be generated using only one line of code and using only the functions eye, zeros, and ones 4. Compute a list of the first 10 factorials (1!, 2!,..., 10!) using the function cumprod. The output should look like the following and be computed using a single line of MATLAB code. >line of code [enter 2 2 24 120 720 5040 40320 362880 10 3628800

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions