Matlab solution loop, for example: I = 1:10 s = solve ('x ^ 3 + x ^ 2 + x = 1 = I ','x') To be a positive root

Matlab solution loop, for example: I = 1:10 s = solve ('x ^ 3 + x ^ 2 + x = 1 = I ','x') To be a positive root


n = 10;i = 1:n;s = cell(1,n);for i = 1:nep = ['solve(''x^3+x^2+x =' num2str(i) ''')'];s{i} = eval(ep);end;vpa(s{1},4) ans =0.5437- 0.7718 + 1.115*i- 0.7718 - 1.115*ivpa(s{2},4) ans = 0.8105- 0.9053 + ...



Using MATLAB to solve a system of equations, the known expression y = x / (1 + ((A / x-1) * exp (- B * x)), when x = 15, y = 0.9, when x = 30, y = 0.999 is used to find ab


Syms a B x y; F = x / (1 + ((A / x-1) * exp (- B * x))) - Y; F1 = subs (F, {X ','y'}, [15,0.9]); F2 = subs (F, {X ','y'}, [30,0.999]); > [a, b] = solve (F1, F2, 'a','b ')



Matlab solves the equation 4exp (1.114) + (100 + 4) exp (R * 1.5) = 96


>> clear
>> syms r
r=solve('4*exp(1.114)+(100+4)*exp(r*1.5)=96')
r =
-0.14386120141267736909730854123541



Matlab drawing axis is set as logarithmic axis


loglog(x,y)
The x-axis and y-axis are logarithmic scale
semilogx(x,y) semilogx(x,y)
The x-axis is logarithmic scale and the y-axis is linear scale
semilogy(x,y) semilogy(x,y)
The x-axis is a linear scale and the y-axis is a logarithmic scale