Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the output of the following code? x = linspace ( - 2 * , 2 * , 4 0 0 ) ; y

What is the output of the following code?
x=linspace(-2*,2*,400);
y1=sin(x);
y2=cos(x);
y3=sin(x).*cos(x);
figure;
plot(x,y1,'r--', 'LineWidth', 2);
hold on;
plot(x,y2,'b:', 'LineWidth', 2);
plot(x,y3,'g-', 'LineWidth', 2);
hold off;
legend('sin(x)', 'cos(x)', 'sin(x)*
cos(x)');
title('Plotofsin(x),cos(x), and
sin(x)*cos(x)');
xlabel('x');
ylabel('Function value');
grid on;
axis([-2*pi2*pi-11]);
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

Will it ever be executed?

Answered: 1 week ago

Question

Does it make clear how measurements are defined?

Answered: 1 week ago

Question

How will your strategy receive approval?

Answered: 1 week ago