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, 22.06.2019 17:50
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
Perform the following tasks: a. create a class named testclass that holds a single private integer field and a public constructor. the only statement in the constructor is one that displays the message “constructing”. write a main()function that instantiates one object of the testclass. save the file as testclass.cpp in the chapter 08 folder. run the program and observe the results. b. write another main()function that instantiates an array of 10 testclass objects. save the file as test class array.c . run this program and observe the results.
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
How do you set up a slide show to play continuously, advancing through all the slides without requiring your interaction? a. click set up slide show, and then select the loop continuously until ‘esc' and show without narration options. b. click set up slide show, and then select the loop continuously until ‘esc' and use timings, if present options. c. click set up slide show, and then select the show presenter view and use timings, if present options. d. click set up slide show, and then select the show without animation and browsed at a kiosk (full screen) options.
Answers: 3
question
Computers and Technology, 23.06.2019 07:00
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
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
Physics, 16.07.2019 02:50
Questions on the website: 13722367