Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create an .m-file that asks the user to enter two separate integer values between 1 and 10 with the input command. Each integer value should

Create an .m-file that asks the user to enter two separate integer values between 1 and 10 with
the input command. Each integer value should serve as a seed value to use for a pseudo-random
number generation. Most pseudo-random number generators are built on algorithms involving
some kind of recursive method starting from a base value that is determined by an input called
the "seed". Thus the same seed will result in the same list of "random numbers". This is why
different seeds are required to change the output of a pseudo-random number generator.
Matlab's seed can be changed through the use of the 'rng' command, the documentation for
which can be found on the mathworks.com website (note that you will need to change the seed
twice, once for the random number of rows, and again for the number of columns). Now that
you have created two different seeds, use these to generate a randomly sized matrix filled with
random elements via the 'rand' command (which can also be found on the mathworks website).
Using conditional statements, check if the matrix is square and display the output along with the
matrixs dimensions using the 'size' command.
use matlab. please explain how to solve this. thank you

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

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions