标签: matlab symbolic-math variable-declaration floating-point-conversion
使用符号表达式时,问题是如何将符号值转换为离散值并获得z值。
x=2 syms x y=x^2 z=x+y
答案 0 :(得分:1)
syms x y y = x^2 z = x+y y_function = matlabFunction(y); z_function = matlabFunction(z); x = 2; z_function(2)