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
thumb_up100%
MATLAB Practice:
Using version R2021b
MATLAB code which tweaks the following code.
close all
x = 0: pi/100: 2 * pi;
wave1 = sin (x * 3);
wave2 = sin (x * 7) + cos (x * 8);
plot (x, wave1, 'b-', x, wave2, 'r:');
legend ('wave 1', 'wave 2');
title ('Some Example Data Waveforms');
xlabel ('Angle');
ylabel ('Amplitude');
a. Use subplot(3,1,x)
b. Draw “wave1” with stem function in subplot(3,1,1) with xlabel, ylabel and legend
c. Draw “wave2” with stem function in subplot(3,1,2) with xlabel, ylabel and legend
d. Draw “wave1” and “wave2” with stem function in subplot(3,1,3) with xlabel, ylabel, legend and title.
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 4 steps with 5 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_forward5. Plot the curve of the function given below in MATLAB, y(t) = 9*t2 + 12*t - 5 andt = -10:0.01:10arrow_forwardThe zero-pressure specific heat of dry air c, in kJ/(kg K) is given by: C, = 0.99403+ 1.671 × 10-4T + 9.7215 × 10-8T²-9.5838 × 1o-11T 3 + 1.9520 × 10-14T 4 Here T is absolute temperature in K. Write a MATLAB script to plot cp versus T in the range between 0 to 1500 K, and to determine the temperature that corresponds to a specific heat of 1.1 kJ/(kg K) with MATLAB polynomial functions. NOTE: 1. Axis titles and units are compulsory 2. The range the axes are to be set in such that the plot is visible in at least 70% of the plot canvass.arrow_forward
- in MATLAB, how can i program a nested for loop for variable pairs i and j to look like this: I =1 J=1 I =1 J=2 I =2 J=1 I =2 J =2 I =3 J =1 I =3 J =2arrow_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_forwardUse Matlab to write a function that calculates the area of a triangle given length of the three edges.arrow_forward
- “The function negl3(n) = negl1(n) + negl2(n) is negligible.” What can you say about the function negl6(n) = negl4(n) – negl5(n)?arrow_forwardzero-pressure specific heat of dry air cp in kJ/(kg K) is given by: cp = 0.99403 + 1.671 × 10−4T + 9.7215 × 10−8T 2 −9.5838 × 10−11T 3 + 1.9520 × 10−14T 4 Here T is absolute temperature in K.Write a MATLAB script (a) to plot cp versus T in the range between 0 to 1500 K, and (b) to determine the temperature that corresponds to a specific heat of 1.1 kJ/(kg K) with MATLAB polynomial functions. NOTE: 1. Axis titles and units are compulsory 2. The range the axes are to be set in such that the plot is visible in at least 70% of the plot canvassarrow_forwardWhat does this line of code mean in Matlab fprintf(‘%5s%20s%20s\n’)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