How to use an object property in a rogue function?
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Assumptions finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!