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?

 Akzeptierte Antwort

Michal
Michal am 30 Okt. 2017
Bearbeitet: Michal am 30 Okt. 2017

0 Stimmen

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

Weitere Antworten (1)

Alfonso Salas-Cruz
Alfonso Salas-Cruz am 9 Mai 2021

0 Stimmen

how evaluate an symbolic expresion?

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 30 Okt. 2017

Kommentiert:

am 9 Mai 2021

Community Treasure Hunt

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

Start Hunting!

Translated by