Created
April 4, 2017 16:48
-
-
Save jasikpark/f2415af7254901972cce44d7b2e9452a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chapter 7 | |
Problem 2 | |
Description | |
r = @(theta) 3.*sin(3.*cos(0.5.*theta)) | |
r(pi/6) | |
r(5*pi/6) | |
theta = 0:0.01:(4*pi); | |
polarplot(theta,r(theta)) | |
Problem 11 | |
Description | |
GPA = @(G,C) round(sum((70-double(G)).*C)/sum(C),1); | |
Grades = ['A','B','F','C','B','A','D','A']; | |
CreditHours = [4,3,3,2,3,4,3,3]; | |
GPA(Grades,CreditHours) | |
Problem 12 | |
Description | |
dist = @(A,B) sqrt((B(1)-A(1))^2+(B(2)-A(2))^2+(B(3)-A(3))^2); | |
dsqr = @(A,B) dist(A,B)^2; | |
theta = @(A,B,C) acos((dsqr(A,C)-dsqr(A,B)-dsqr(B,C))/(2*dist(A,B)*dist(B,C))); | |
A = [-5,-1,6]; B = [2.5,1.5,-3.5]; C = [-2.3,8,1]; | |
theta(A,B,C) | |
A = [-5,5,0,0]; B = [3.5,-6.5,0]; C= [0,7,0]; | |
theta(A,B,C) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment