Plot sin(x) for x values ranging from 0 to (in separate Figure Windows): using 10 points in this range using 100 points in this range
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:3| Question number:15.3
All Answers
total answers (1)
Ch3Ex15.m
% Plots sin(x) with 10 points and 100 points in range 0 to pi
x = linspace(0,pi,10);
y = sin(x);
clf
figure(1)
plot(x,y,'k*')
title('sin(x) with 10 points')
figure(2)
x = linspace(0,pi);
y = sin(x);
plot(x,y,'k*')
title('sin(x) with 100 points')
need an explanation for this answer? contact us directly to get an explanation for this answer