How to use an object property in a rogue function?
Mostrar comentarios más antiguos
Hello, I want to define an object's property as an algebraic expression and use it as a private function in the integral method. This is how I tried:
syms x
r1 = reaction;
r1.rx=1./(k1*(1-x));
q1=integral(@(x)r1.rx,0,0.5)
However I get the following error:
Error using integralCalc/finalInputChecks (line 511)
Input function must return 'double' or 'single' values. Found 'sym'.
Everything works fine if I use the expression directly on the private function.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Assumptions en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!