Borrar filtros
Borrar filtros

How to plot two vectors at the same time

1 visualización (últimos 30 días)
Jonas Morgner
Jonas Morgner el 17 de Abr. de 2022
Comentada: Jonas Morgner el 18 de Abr. de 2022
Use these variables to plot the graphical representation of the polynomial.
To that end, you must use the function plot, using two parameters, 1)
the vector created in step b and 2) the polyval function (also with two
parameters, the vectors created in steps a and b, in that order).
v1 = [1 -2 -5 6] % vector from exercise A
v2 = [-100 : .1 : 100 ] % vector from excercise B

Respuesta aceptada

Sam Chak
Sam Chak el 17 de Abr. de 2022
@Jonas Morgner, Do you mean llke this?
v1 = [1 -2 -5 6];
v2 = -100 : .1 : 100;
y = polyval(v1, v2);
plot(v2, y)

Más respuestas (0)

Categorías

Más información sobre Polynomials en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by