How do you input this function

K = Gain of the amplifier = 12.5.
Vi = input voltage -2.5 < Vi < 2.5 V, (use 0.25 increments).
V+ = positive power supply voltage, V+ = +20 V.
V- = negative power supply voltage V- = -20V.
Vo = output voltage
Vo = -KVi
How do i input the range of voltage into matlab? I am stuck on what to do. I am supposed to plot the output voltage

 Respuesta aceptada

Image Analyst
Image Analyst el 28 de Abr. de 2013

0 votos

Do you want to interactively ask the user for them? If so, look at inputdlg(). There are examples in the help. Otherwise just hard code them into your code like
positiveV = 20;
negativeV = -20;
Vi = -2.5 : 0.25 : 2.5; % Alternatively use linspace()

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 28 de Abr. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by