Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need asap MATLAB CODE Matlab Functions you may use Clear all, clc, rand, size, length zeros, ones. [] (empty array), sort, flip, rem mod Lab

image text in transcribed

need asap MATLAB CODE

Matlab Functions you may use Clear all, clc, rand, size, length zeros, ones. [] (empty array), sort, flip, rem mod Lab Exercise Write a simple script that will do the following tasks: Generate a matrix with random decimal numbers of values between 0 and 20. The size of the matrix should be defined as variables at the beginning of the script. Re-arrange the matrix elements such that the new matrix can produce staircase shape if plotted using bar3 command. The figures below show the original matrix plot and required output. 1 20 20 15 15 10 10 5 5 O 109105 23:09 12 Str 1072 Before After The below script lines can help you to rearrange the colormap to reflect the values of the matrix (the default map reflects the value of the y-axis) b = bar3 (A) : for k=1:length (b) zdata = b (b).Data; b(k). Data = zdata; b(k).FaceColor = 'interp'; end Matlab Functions you may use Clear all, clc, rand, size, length zeros, ones. [] (empty array), sort, flip, rem mod Lab Exercise Write a simple script that will do the following tasks: Generate a matrix with random decimal numbers of values between 0 and 20. The size of the matrix should be defined as variables at the beginning of the script. Re-arrange the matrix elements such that the new matrix can produce staircase shape if plotted using bar3 command. The figures below show the original matrix plot and required output. 1 20 20 15 15 10 10 5 5 O 109105 23:09 12 Str 1072 Before After The below script lines can help you to rearrange the colormap to reflect the values of the matrix (the default map reflects the value of the y-axis) b = bar3 (A) : for k=1:length (b) zdata = b (b).Data; b(k). Data = zdata; b(k).FaceColor = 'interp'; end

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

Step: 3

blur-text-image

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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

To find integral of ?a 2 - x 2

Answered: 1 week ago

Question

To find integral of e 3x sin4x

Answered: 1 week ago

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago

Question

What are Fatty acids?

Answered: 1 week ago

Question

What are Electrophoresis?

Answered: 1 week ago

Question

Knowledge of process documentation (process flow charting)

Answered: 1 week ago