I have x^2+5*x+6=0.

I see the roots with the root command but i want to set them as variables to a new function. Also how can i set them to two different displays? I want to write down:

sprintf( 'the first root:%f and the second root:%f')

Skip to content
# MATLAB: Assigning roots as variables to a function

roots

I have x^2+5*x+6=0.

I see the roots with the root command but i want to set them as variables to a new function. Also how can i set them to two different displays? I want to write down:

sprintf( 'the first root:%f and the second root:%f')

## Best Answer