How to define a constat in function handle?

Hello,
Suppose I have to define a polynomial with function hadle of f(x,y) = ax^2+by+c with a, b, c as constants. So I can do the other mathematical operations likr integration, differentiation with this function handle.
Please note that I dont want to define the constants as numbers like f = @(x,y) 3x^2+4y+5.
Could someone please help me?
Thanks and regards

 采纳的回答

You mean like this?
[a,b,c]=deal(3,4,5);
f = @(x,y)a*x.^2+b*y+c
f = function_handle with value:
@(x,y)a*x.^2+b*y+c
Or like this?
syms x y a b c f(x,y)
f(x,y)=a*x.^2+b*y+c
f(x, y) = 

1 个评论

The symbolic one. That was the command I was looking for.
Thanks you.

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Polynomials 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by