Multiplying a function stored in a function handle by a constant
Mostrar comentarios más antiguos
fBasis = { @(x)sin(x) , @(x)sin(2*x) , @(x)sin(3*x) }
p = [2, 0, 0.5] end code
Your function would return the handle to a function that computes y = 2sin(x) + 0.5sin(3x).
How would you do something like this? I know it is not possible to multiply a function handle by a contant and for this poblem, I do not know what kinds of functions will be inputted in the array fBasis. Yes this is a small portion of a homework question but we are allowed to ask for help. A nudge in the right direction about how to start this would be very much appreciated.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!