Graficar dos funciones
Publicado por Adolfo Valdez Bahena (5 intervenciones) el 31/05/2017 10:38:07
Hola, quiero graficar dos funciones que son "lol" y "th" del siguiente código, directamente no son dependientes aunque el valor de "th" definitivamente afecta el valor de "lol", es como una reacción en cadena. De no ser posible podría graficar "faa" en función de "th" (estos si guardan una relación directa en la ecuación) pero no se cómo hacerlo ya intenté de la forma "plot(th,faa);" pero no lo hace. Agradecería sugerencias, de antemano gracias.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
function B1_Callback(hObject, eventdata, handles)
%---------------------------------------------------------------------
%VARIABLES%
%---------------------------------------------------------------------
global ltto lth ltb llol ta dttor dthar tw ll
global nll ptr m n wcc wtf lo ki ku ppres vg t wwp
ta = handles.V1;
dttor = handles.V2;
dthar = handles.V3;
tw = handles.V4;
ll = handles.V5;
nll = handles.V6;
ptr = handles.V7;
m = handles.S.m;
n = handles.S.n;
wcc = handles.V8;
wtf = handles.V9;
lo = handles.V10;
ki = handles.V11;
ku = handles.V12;
ppres = handles.V14;
wwp = handles.V14;
t = linspace(0.00001,24,14400);
%t2 = linspace(0,24,144);
vg = linspace(0,4,14400);
%---------------------------------------------------------------------
%CÁLCULO TTO%
%---------------------------------------------------------------------
R = ll./nll;
dttoi = dttor*power((((ki*ki*R)+1)./(R+1)),n); %Initial top-oil rise
dttou = dttor*power((((ku*ku*R)+1)./(R+1)),n); %Ultimate top-oil rise
c = (0.1323*wcc) + (0.0882*wtf) + (0.3513*lo); %Thermal capacity ONAN Y ONAF
%c = (0.1323*wcc) + (0.1323*wtf) + (0.5099*lo); %Thermal capacity FORCED-OIL
tautor = (c*dttor)./ptr; %Top-oil time constant at rated kVA
tauto = tautor.*(((dttou./dttor)-(dttoi./dttor))/((power((dttou./dttor),(1./n)))-(power((dttoi./dttor),(1./n))))); %Top-oil time constant
dtto = (dttou-dttoi).*(1-exp(-t./tauto)) + dttoi; %Differential top-oil rise over
tto = ta + dtto; %Top-oil
%---------------------------------------------------------------------
%CÁLCULO TH%
%---------------------------------------------------------------------
dthr = dthar - dttor; %Hot-spot
dthi = dthr*(power(ki,2*m)); %Initial hot-spot
dthu = dthr*(power(ku,2*m)); %Ultimate hot-spot
dth = (dthu-dthi).*(1-exp(-t./tw)) + dthi; %Transient winding hottest-spot
th = ta + dtto + dth; %Hottest-spot temperature
%---------------------------------------------------------------------
%CÁLCULO LOL%
%---------------------------------------------------------------------
faa = exp((15000./383)-(15000./(th+273))); %Aging acceleration factor
feqa = (faa.*t)./(t); %Equivalent aging factor
lol = (feqa.*t.*100)./180000; %Loss of life
Valora esta pregunta
0