Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
I need help with my MATLAB code. I having problems with the double values of trig. For the following code, I should get both t1 and t_1 to be equal to 160 degrees, but I don't. t1 = 160 and t_1 = 20. I know that asind(b/sind(theta2)) could equal to both 160 degrees and 20 degrees. So, how do I create a
clc;
clear all;
theta1 = 160;
theta2 = 35;
a = cosd(theta1)*sind(theta2)
b = sind(theta1)*sind(theta2)
t1 = acosd(a/sind(theta2))
t_1 = asind(b/sind(theta2))
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- I need help with programming in MATLAB. The following code transforms cartesian coordinates to the kepler elements. Can you give me the code for transforming kepler orbital elements to cartesian coordinates. The following code gives the 6 kepler elements. Transform those elements into cartesian coordinate that match the values under the Example Usage part of the code. Can you send a screenshot so I know the output of your code matches the input of the following code? I have asked this question twice and I have gotten the exact same code as the answer and it did not match. Please make sure the results match. % Example usage:x = 1000; y = 2000; z = 3000; vx = 4; vy = -3; vz = 2; [a, ecc, inc, raan, argp, f] = cart2orb(x, y, z, vx, vy, vz); % Display the resultsdisp(['Semi-Major Axis (a): ', num2str(a), ' km']);disp(['Eccentricity (ecc): ', num2str(ecc)]);disp(['Inclination (inc): ', num2str(inc), ' degrees']);disp(['Right Ascension of Ascending Node (raan): ',…arrow_forwardf(x) = 1/(1 + 25.a?) This is a somewhat famous function in numerical analysis because it displays interesting behavior when approximated using polynomial interpolation on uniformly spaced nodes. You are going write your own code for polynomial interpolation and investigate the accuracy of two approximations. Task: Do the following: 1. Write a function that takes an array containing n+1 distinct points and returns the coefficients a, k 0, 1, .. . , n for the Newton form of the interpolating polynomial for an arbitrary function. You can pass in either the function f(x) or an array of function values at the points. 2. Write a function that takes the Newton coefficients of the polynomial and a point r and evaluates P,(x). This should be the nested product form that is similar to Horner's method. 3. Write a program that calls your two functions to compute the interpolating polynomial for the specific function f(x) given above and does the following: (a) Using the 21 uniformly spaced nodes…arrow_forwardNeed help in Matlab. How do I modify this program to produce eye shapes like the pink picture using scaling, rotating and translating? Thank you! figure(1) x(1:2,1)=[1;0]; plot(x(1), x(2),'*'); grid on; hold on; axis([-15 15 -15 15]); k=1; Inc=1; for j=1:Inc:360; x(1:2,k+1)=[cosd(Inc) -sind(Inc);sind(Inc) cosd(Inc)]*x(1:2,k); plot(x(1,k+1), x(2,k+1),'^'); k=k+1; %for j=1:Inc:360; %x(1:2,k+1)=[cosd(Inc) -sind(Inc);sind(Inc) cosd(Inc)]*x(1:2,k); %plot(x(1,k+1), x(2,k+1),'^'); %k=k+1; %pause(); end for k=1:Inc:360; y1(1:2,k)=[1.5 0;0 3]*x(1:2,k); plot(y1(1,k),y1(2,k),'^') %for k=1:Inc:360; %y1(1:2,k)=[1.5 0;0 3]*x(1:2,k); %plot(y1(1,k),y1(2,k),'^') %pause(0.1); end for k=1:Inc:360; y2(1:2,k)=[3 0;0 1.5]*x(1:2,k)+[7;5]; plot(y2(1,k),y2(2,k),'^') %for k=1:Inc:360; %y2(1:2,k)=[3 0;0 1.5]*x(1:2,k)+[7;5]; %plot(y2(1,k),y2(2,k),'^') %pause(0.1); end for k=1:Inc:360; y3(1:2,k)=[3 0;0 1.5]*x(1:2,k)+[-7;5]; plot(y3(1,k),y3(2,k),'^') %for k=1:Inc:360; %y3(1:2,k)=[3 0;0 1.5]*x(1:2,k)+[-7;5];…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education