clc clearfor S=1:0.1:10;t=1.1346*log((-0.6*S)+7)-(0.0651*log(S));if t>=0 S; t;m=[t S]elseendend
MATLAB: How to get all values S and t in same matrix m
how to get all values s and t in same matrix m?
Related Solutions
You cannot use if like that to operate element-wise on arrays (read the if help to know what your code is actually doing). You could use a loop, but that would be pointlessly complex for this simple task.
Method one: indexing:
P_actual = P - 0.3*(T_m-T_s);idx = T_m>T_s;P_actual(~idx) = P(~idx)
Method two: max:
P_actual = P - 0.3*max(0,T_m-T_s)
I recommend using the max method.
Multiply by zeta^2, and collect terms. As long as zeta is not zero, that is not a problem. Your equation reduces to
b*m2 + (a + b*m1)*zeta - z*zeta^2 + (a*m1 + b)*zeta^3 + (a*m2)*zeta^4 == 0
We only need to worry about zeta==0 if either of b or m2 was zero. In that case, zeta==0 would be one of the roots of the above equation.
Of the coefficients of the above equation, all are apparently known, and have fixed values. So there are 4 roots.
Then the "inverse" is given as any of the 4 roots of that equation, thus:
zetaroots = solve(b*m2 + (a + b*m1)*zeta - z*zeta^2 + (a*m1 + b)*zeta^3 + (a*m2)*zeta^4,zeta,'maxdegree',4);
You don't want me to write the entire expression in here, as it is a massive mess of terms.
The problem is, the "inverse" is a rather nasty mess of a function of z. There are 4 solutions. Even if I show only 5 digit numbers in that expression for all coefficients, it is still a nasty mess.
vpa(expand(subs(zetaroots,{a,b,m1,m2},[-2.0800,4.0800,0.5,-0.03])),5)ans = - (0.16667*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2))/(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/6) - (0.16667*(10680.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 70.15*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 256.82*z^2*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) + 2868.6*z*(5.1962*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 6767.6*z - 8231.4*z^3 - 125699.0)^(1/2) + 106211.0*(5.1962*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 6767.6*z - 8231.4*z^3 - 125699.0)^(1/2) + 192.31*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2))^(1/2))/((0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/6)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/4)) - 12.179 (0.16667*(10680.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 70.15*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 256.82*z^2*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) + 2868.6*z*(5.1962*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 6767.6*z - 8231.4*z^3 - 125699.0)^(1/2) + 106211.0*(5.1962*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 6767.6*z - 8231.4*z^3 - 125699.0)^(1/2) + 192.31*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2))^(1/2))/((0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/6)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/4)) - (0.16667*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2))/(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/6) - 12.179 (0.16667*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2))/(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/6) - (0.16667*(10680.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 70.15*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 256.82*z^2*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 2868.6*z*(5.1962*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 6767.6*z - 8231.4*z^3 - 125699.0)^(1/2) - 106211.0*(5.1962*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 6767.6*z - 8231.4*z^3 - 125699.0)^(1/2) + 192.31*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2))^(1/2))/((0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/6)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/4)) - 12.179 (0.16667*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2))/(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/6) + (0.16667*(10680.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 70.15*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 256.82*z^2*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2) - 2868.6*z*(5.1962*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 6767.6*z - 8231.4*z^3 - 125699.0)^(1/2) - 106211.0*(5.1962*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 6767.6*z - 8231.4*z^3 - 125699.0)^(1/2) + 192.31*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/2))^(1/2))/((0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/6)*(96.154*z*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 5340.2*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(1/3) + 9.0*(0.096225*(2.07e6*z^4 + 7.6638e7*z^3 + 1.1346e6*z^2 + 6.3008e7*z + 5.8506e8)^(1/2) - 125.33*z - 152.43*z^3 - 2327.6)^(2/3) + 256.82*z^2 + 70.15)^(1/4)) - 12.179
I'm not at all sure what you expected the inverse of your function would look like. But it is not pretty.
Related Question
- Indexing to create a new array
- Index exceeds array bounds. Error in PID_optimized (line 14) gc = tf(K(i)*([1 2*a(j) a(j)^2]),[1 0]); %controller transfer fx Gc
- Trying to solve a log equation with one variable help! ERROR: 1 equations in 2 variables. New variables might be introduced.
- How to replace repeating no.s in an array by distinct no.
Best Answer