Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

matlab plz figure out A to H %These are given variables that will be used in the problems, the values are randomly generated so that

matlab

plz figure out A to H

image text in transcribed

\%These are given variables that will be used in the problems, the values are randomly generated so that you \%do not hardcode. You should be using the variable names in your code and writing code that is generalizable num1 = randi(5); \%random integer between 1 and 5 num2 = randi (30)+20; \%random integer between 20 and 50 vec1 = randperm(randi (50) ); \%a random number of random numbers vec2 = randperm(10); \%vector of unique random numbers vec3 =1:10; \% Create a vector that consists of "num1" equally spaced numbers between 2 and 11 (inclusive) (A) A=[2511]; \%Using the colon operator, create a vector that goes from 3 to 'num2' in steps of 2 (B) B=[3:48]; \%Find the length of 'vec1' (C) c=[10]; \%Find the maximum value of vec2 (D) and the index of the maximum value (E) (these can be done on the same line) D=[10]; E=[]; \%Sort 'vec2' in descending order (F) and find the indicies representing how the vector was sorted (G) (these can be done on F=[10,9,8,7,6,5,4,3,2,1] \%Sort 'vec3' based on the indices of how 'vec2' was sorted (H) (You can use the answer you have from G) H=[]; \%Find the average value of 'vec1' (I) I=[4]

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

Students also viewed these Databases questions

Question

What is American Polity and Governance ?

Answered: 1 week ago

Question

Explain how cultural differences affect business communication.

Answered: 1 week ago

Question

List and explain the goals of business communication.

Answered: 1 week ago