MATLAB: How to create a symbolic expression with a string like ‘5.01e-7*x2 – 5.01e-7 + (-9*x1 + 4)/x1’ MATLABsymbolic The string is '5.01e-7*x2 – 5.01e-7 + (-9*x1 + 4)/x1' I want to create syms x1,x2 and symbolic expression: 5.01e-7*x2 – 5.01e-7 + (-9*x1 + 4)/x1 Many thanks! Best Answer str2sym( '5.01e-7*x2 - 5.01e-7 + (-9*x1 + 4)/x1')ans =0.000000501*x2 - (9*x1 - 4)/x1 - 0.000000501 Related SolutionsMATLAB: X=(x0,x1,….,Xn0-1) ==> Xhat=(x0,x0,x0,x0, x1,x1,x1,x1, …….. ,Xn0-1,Xn0-1,Xn0-1,Xn0-1), How to copy like this in vector xhat = kron(X, ones(1,4)) MATLAB: Expanding matrix [j k i]=meshgrid([x1,x2]);xx = [i(:) j(:) k(:)]; Related QuestionHow can i solve this equation 1/(24*(x^4/24 + x^3/24 + x^2/24 + x/24 + 1/24))FSOLVE requires all values returned by functions to be of data type double.1.1 + 0.1 == 1.2 returns false
Best Answer