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:

max(abs(f-ff))

when both are handle-functions? Thanks in advance!

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

Answers


Try this:

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

Need Your Help

Call XPCService from within App Extension (Share)

objective-c xpc nsusernotification nsusernotificationcenter nsxpcconnection

I have an app, that is a container app for a Share App Extension and an XPC Service. The XPC Service creates a NSUserNotification and delivers it to the NSUserNotificationCenter.

Tabs not showing in the Fragment Activity

java android android-fragmentactivity

I am trying to put a tab host in a fragment activity,