Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Matlab Live Script called Vector_ Your_ID >.mlx to perform the following operations: a. initialize a 5-dimensional vector u composed of random numbers

image text in transcribed
Create a Matlab Live Script called "Vector_ Your_ID >.mlx " to perform the following operations: a. initialize a 5-dimensional vector u composed of random numbers between 0 and 1 (Hint: search for the function rand in the Matlab Documentation) b. normalize u (Hint: search the Documentation for the norm function) c. multiply u by a scalar alpha valued according to the first letter of your first name (A=1,B=2,C=3,) and assign the result of this operation to a vector v Optional (10 extra points): perform the operation from point c above using a Character variable that contains your last name, and compute the value of the variable alpha using the function double (Hint: check the character to number discussion at this link: https://www.mathworks.com/matlabcentral/answers/479451-assigning-letters-to-numbers). Double check that your result is consistent with the vector v computed earlier

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