Multiply two griddedInterpolant functions
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Anita Capelli
am 25 Okt. 2021
Bearbeitet: Anita Capelli
am 25 Okt. 2021
I have some data and I have interpolated them using the function griddedInterpolant. Now, let's suppose I end up with f and g from the previous interpolation. What I want to do now is fun = f*g. I can I do that?
Thanks
Anita
0 Kommentare
Akzeptierte Antwort
Bjorn Gustavsson
am 25 Okt. 2021
If you have 2 functions f(x,y) and g(x,y) you can evaluate the product on your selected grid-points and multiply them:
fx_at_xy = f(x,y).*g(x,y);
or you can create a function that multiplies the two:
f_times_g = @(x,y) f(x,y).*g(x,y);
and use that one - this should (at least ought to) be more convenient when for example integrate over some region in the x-y-plane.
HTH
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!