Graphing the difference of two handle-functions in matlab

I have two handle-functions, their graphs are very close to each other, I can see this by plotting both functions.

f = @(x1);
ff = @(x2);
fplot(f, [0 1],'r')
hold on
fplot(ff, [0 1],'b')
hold on

I would like to have another graph where I take the difference between f-ff

fplot((f-ff), [0 1])

how can I do this in matlab? And how can I find the:


when both are handle-functions? Thanks in advance!

PS. Just let me know if I should add more info about f and ff.


Try this:

fplot(@(x) f(x) - ff(x), [0 1])

Need Your Help

$.ajax 'GET' is not working properly

c# jquery ajax rest

I'm trying to access rest service using ajax.

Could the local .htaccess not behave like the remote one?

php .htaccess mod-rewrite wamp remote-server

I have been given access to some old, functional website with the task of updating some aspect of it.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.