Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Do Both Codes in MATLAB Programming: Problem 1: Write a program, problem1.m, that plots graphs of norms 1 through 10 for vectors a [0

Please Do Both Codes in MATLAB Programming:

image text in transcribed

Problem 1: Write a program, problem1.m, that plots graphs of norms 1 through 10 for vectors a [0 2 4] and b [-4.5 5.5 6.5] in two side-by-side plots using the subplot command. Place the plot for a's norms on the left and b's norms on the right. Give both of them axes labels and titles and adjust their axes limits to match each other. Problem2: (based on problem 2 from page 196 from the textbook). Write a function with header [out] mylsOrthogonal(v1, v2, tol) where v1 and v2 are column vectors of the same size and tol is a scalar value larger than 0. The output argument, out, should be 1 if the angle between v1 and v2 is within tol of pi/2. That is, an angle in radians (theta) such that (pi/2-theta)out m out 0 ylsOrthogonal(1:0.001], [0.001;1], 0.001) out mylsOrthogona(1:0.001], [1;1, 0.01) out 0 Problem 1: Write a program, problem1.m, that plots graphs of norms 1 through 10 for vectors a [0 2 4] and b [-4.5 5.5 6.5] in two side-by-side plots using the subplot command. Place the plot for a's norms on the left and b's norms on the right. Give both of them axes labels and titles and adjust their axes limits to match each other. Problem2: (based on problem 2 from page 196 from the textbook). Write a function with header [out] mylsOrthogonal(v1, v2, tol) where v1 and v2 are column vectors of the same size and tol is a scalar value larger than 0. The output argument, out, should be 1 if the angle between v1 and v2 is within tol of pi/2. That is, an angle in radians (theta) such that (pi/2-theta)out m out 0 ylsOrthogonal(1:0.001], [0.001;1], 0.001) out mylsOrthogona(1:0.001], [1;1, 0.01) out 0

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

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions

Question

CFG c) L= {wwR}, w={a,b)*

Answered: 1 week ago