-2

I've got variable which stores anonymous function e.g.

temp_f = @(x)((1/h^3)*(((xi+2*i)-x)^3-4*((xi+i)-x)^3))

I would like to multiply it by 'varA' so in next step I could get

temp2_f = @(x) (temp_f(x) * varA)

how can I approach that?

thanks in advance

jsam_
  • 1
  • 1

1 Answers1

0

If you want varA to be an input argument to the new anonymous function, then:

temp2_f = @(x, varA) temp_f(x)*varA; 
Shai
  • 111,146
  • 38
  • 238
  • 371
  • Yes, but then I'll get value of temp_f(x) and I want to have it in polynomial form. – jsam_ Nov 30 '16 at 16:56
  • @jsam_ what do you mean by "polynomial form"? are you trying to do symbolic computations? then you should look into `sym` and `MuPAD` – Shai Nov 30 '16 at 16:58