subject

I am doing an assignment in MatLAB and I do not understand how to get the dist_AB value. I have tried using the norm command with inside the difference between A - B and the difference between the Frobenius form, but in each case the asnwer is not correct. I do not understand if I am using a wrong Matlab command or my math logic is wrong. Can someone help me? %To find the Euclidean distance between two vectors, find the 2-norm of the difference of
%those vectors. Enter column vectors u and v. Then use the norm() command to find d(u, v), storing
%it in dist_uv.
u = [4; 3]
v = [-4; -12]
two_norm_u = norm(u, 2)
two_norm_v = norm(v, 2)
dist_uv = norm(u - v)
%To find the distance between two matrices with respect to the Frobenius inner product,
%find the Frobenius norm of the difference of those matrices. Enter matrices A and B.
%Then use the norm() command to find d(A, B), storing it in dist_AB.
A = [3 -7 4 3; -2 4 -5 0]
B = [1 -7 2 5; 0 0 -5 2]
fro_A = norm(A, 'fro')
fro_B = norm(B, 'fro')
%Below are the variables used for the last requirement, each are wrong.
fro_difference = norm(fro_A - fro_B)
dist_AB = norm(A - B)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
question
Computers and Technology, 24.06.2019 15:00
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
question
Computers and Technology, 24.06.2019 20:00
Write c++programs for the following problem: let the user enter two numbers and display which is greater. !
Answers: 1
question
Computers and Technology, 25.06.2019 04:00
Use the wrap text icon to modify which graphic appears in the front of layered images modify the picture effects change the way text is wrapped around an object apply wordart to the text
Answers: 1
You know the right answer?
I am doing an assignment in MatLAB and I do not understand how to get the dist_AB value. I have trie...
Questions
question
Spanish, 05.04.2021 23:00
question
Mathematics, 05.04.2021 23:00
Questions on the website: 13722360