Numerical simulation with symbolic expressions
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello, I’m a beginner with octave, never used, and I would like to compute some things.
I have long symbolic expressions and I would like to compute the output of the functions for a set of parameters included in the function which may vary between an interval.
for example I’d like to compute this function for the parameters which may range between an interval or else
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1025085/image.jpeg)
thanks for your help,
댓글 수: 0
답변 (1개)
Torsten
2022년 6월 8일
syms gamma alpha b
expr = gamma^2*alpha + log(b);
expr = matlabFunction(expr,'Vars',[gamma alpha b]);
gamma = 0:0.1:1;
alpha = 2.0;
b = 5.0;
plot(gamma,expr(gamma,alpha,b))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!