Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

plotting a graph on matlab

5 visualizaciones (últimos 30 días)
Prakriti Biswas
Prakriti Biswas el 30 de Ag. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hi I'm trying to plot a graph on MATLAB for the steady state armature current with respect to the frequency coeffiecient B. I need to graph it for a range of B from 0 to infinity. I tried the code:
clc;
clear all;
k=input('Enter constant k');
Ra=input('Enter resistence Ra');
for B=0:007
x=(Ra*B)+(k*k);
iss=B/x;
plot(B,iss)
xlabel('B')
ylabel('iss')
end
But the graph is empty. What should I do?

Respuestas (1)

KSSV
KSSV el 30 de Ag. de 2020
Editada: KSSV el 30 de Ag. de 2020
Read about element by element operations in MATLAB.
clc;
clear all;
k=input('Enter constant k');
Ra=input('Enter resistence Ra');
B=0:007
x=(Ra*B)+(k*k);
iss=B./x;
plot(B,iss)
xlabel('B')
ylabel('iss')
  2 comentarios
Prakriti Biswas
Prakriti Biswas el 30 de Ag. de 2020
Alright, could you help me plot the same thing for a range of 0 to infinity?
KSSV
KSSV el 30 de Ag. de 2020
As there is no way to represent the infinity in codes..you make your required number B very high..may be you can use:
db = 1. ; % the step size
B = 0:db:10^3 ;

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by