Write a function plot2fnhand that will receive two function handles as input arguments, and will display in two Figure Windows plots of these functions,
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:10| Question number:21.10
All Answers
total answers (1)
plot2fnhand.m
function plot2fnhand(funh1, funh2)
% Plots 2 function handles in 2 Figure Windows
% Format of call: plot2fnhand(fn hand1, fn hand2)
% Does not return any values
x = 1:randi([4, 10]);
figure(1)
y = funh1(x);
plot(x,y, 'ko')
title(func2str(funh1))
figure(2)
y = funh2(x);
plot(x,y,'ko')
title(func2str(funh2))
end
need an explanation for this answer? contact us directly to get an explanation for this answer