Exercise 1(Norm and Inner Product): 1. Please derive the equation governing the
ID: 2966015 • Letter: E
Question
Exercise 1(Norm and Inner Product): 1. Please derive the equation governing the unit ball corresponding to norm. Also please plot it out, attach your code and the figure in the homework. (Hint: If you are using MATLAB, hold on command might be helpful) 2. Define the weighted 2 norm as follows, for any x = Please plot out the unit ball for this norm, attach your code and the figure in the homework. You might check with the fact we discussed in class. 3. If , what are the smallest and largest possible values of Ilx+ yll and x ? y. Please draw the diagram to illustrate the geometrical picture. Without these algebraic calculation, can you find out solutions simply from the geometrical pictures? Please justify it. 4. With v = and w = , find a number c so that w -cv is orthogonal to v. If I just specify and w , again find a number c so that w - cv is orthogonal to v. Please express c by w and v. Justify your result in the geometrical picture.Explanation / Answer
Here si MATLAB code:
clc;
clear all;
Va=14;
Vb=7;
Sa=25;
Sb=12;
ang=pi/6;
t=0:0.1:5;
% for ship B %
x1=zeros(1,length(t));
y1=Sb-Vb*t;
disp('for ship B');
disp(' t x y');
disp([t' x1' y1'])
% for ship A %
x2=Sa*cos(ang)-Va*cos(ang)*t;
y2=Sa*sin(ang)-Va*sin(ang)*t;
disp('for ship A');
disp(' t x y');
disp([t' x2' y2'])
% for distance between them %
dist=((x1-x2).^2+(y1-y2).^2).^0.5;
disp('for sitance between them');
disp(' t d');
disp([t' (((x1-x2).^2+(y1-y2).^2).^0.5)'])
plot(t,dist);
xlabel('time');
ylabel('distance between them');
j=1;
for i=1:length(t)
if (dist(i)<=8);
t1(j)=t(i);
j=j+1;
end
end
% time to see each other %
disp('start time in,[HH:MM]');
disp([fix(sym(t1(1))) frac(sym(t1(1)))*60]);
disp('time they will see each in,[HH:MM]');
disp([fix(sym(t1(j-1)-t1(1))) frac(sym(t1(j-1)-t1(1)))*60]);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.