I need to transform the following function to the symbolic form to evaluate it with arbitrary precision.
Z(N,Thetas) = prod((1 - exp(-(N:-1:2).*Thetas))./(1 - exp(-Thetas)),2)
where Thetas is matrix M x N-1 of the positive real numbers. So the expected result is vector Z (M x 1). I am not able to rewrite function Z to symbolic form and than evaluated it by vpa() command.
Any idea how to effectively solve it?

 채택된 답변

Michal
Michal 2017년 10월 30일
편집: Michal 2017년 10월 30일

0 개 추천

function Z=symZ(N,Thetas,Ndigit)
Thetas = sym(Thetas);
Zsym = prod((1 - exp(-(N:-1:2).*Thetas))./(1 - exp(-Thetas)),2);
Z = vpa(Zsym,Ndigit);
end

추가 답변 (1개)

Alfonso Salas-Cruz
Alfonso Salas-Cruz 2021년 5월 9일

0 개 추천

how evaluate an symbolic expresion?

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

질문:

2017년 10월 30일

댓글:

2021년 5월 9일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by