How to do partial function on input equations?

equn='Numerator:';
eqpn=inputdlg(equn);
eqn=str2sym(eqpn);
equd='Denominator:';
eqpd=inputdlg(equd);
eqd=str2sym(eqpd);
syms(symvar(eq));
varprompt='With Respect to Variable:';
var=inputdlg(varprompt);
frac=(eqn)/(eqd);
k=partfrac(str2sym(frac),var);
disp(k)
Error using str2sym (line 46)
Argument must be string, character vector, or cell
array of character vectors.
Error in untitled10 (line 13)
k=partfrac(str2sym(frac),var);

 采纳的回答

var = str2sym(inputdlg(varprompt));

3 个评论

still doesnt work. i think the problem is the k=partfrac(str2sym(frac),var); i think the problem is the "fraq" equation
equn = 'Numerator:';
eqpn = inputdlg(equn);
eqn = str2sym(eqpn);
equd = 'Denominator:';
eqpd = inputdlg(equd);
eqd = str2sym(eqpd);
syms(symvar(eq));
varprompt = 'With Respect to Variable:';
var = str2sym(inputdlg(varprompt));
frac = (eqn)/(eqd);
k = partfrac(frac, var);
disp(k)
oh wow thank you very much!!

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by