f

#### numerical solution for cubic equation

```hello, I am now trying to solve a cubic equation like this:
Z^3 + A*Z^2 +B*Z +C = 0
while A, B and C have some value. I want to solve the equation. but
when I use the command:
solve('Z^3 + A*Z^2 +B*Z +C = 0','Z')
it only gives out simbolic solution, while i need the numerical
solution. Is there anyway to get the numerical solution? thanks
``` 0 8/3/2004 3:25:16 AM comp.soft-sys.matlab  211265 articles. 25 followers. 2 Replies 421 Views Similar Articles

[PageSpeed] 5

```Done/
roots.m will help

Zhuoyang Lian wrote:
>
>
> hello, I am now trying to solve a cubic equation like this:
> Z^3 + A*Z^2 +B*Z +C = 0
> while A, B and C have some value. I want to solve the equation. but
> when I use the command:
> solve('Z^3 + A*Z^2 +B*Z +C = 0','Z')
> it only gives out simbolic solution, while i need the numerical
> solution. Is there anyway to get the numerical solution? thanks
``` 0 8/3/2004 5:37:38 AM
```use 'fsolve'

a. Kumar

Zhuoyang Lian wrote:
>
>
> hello, I am now trying to solve a cubic equation like this:
> Z^3 + A*Z^2 +B*Z +C = 0
> while A, B and C have some value. I want to solve the equation. but
> when I use the command:
> solve('Z^3 + A*Z^2 +B*Z +C = 0','Z')
> it only gives out simbolic solution, while i need the numerical
> solution. Is there anyway to get the numerical solution? thanks
``` 0 8/3/2004 5:39:20 AM