📄 current2voltage3.m
字号:
function Vo=current2voltage3(u)
%==============================================
% current2voltage= Esta funcion permite transformar el valor de la corriente de entrada
% a voltage.
%==============================================
%
% AUTORES : Z. AGUINO & D. STECKLER
% Universidad de Carabobo
% Valencia edo. Carabobo, VENEZUELA
%
% FECHA : Diciembre 2003
% VERSION : 1.0
%
%==============================================
% Realizado bajo MATLAB 6.5 Release 13/ Diciemdre 2003 (DZ)
%==============================================
%
%
%[c d]=size(u);
%Vo=zeros(c,d);
if isempty(find_system(gcs,'Name','Fotodetector'))~=1
Current2Voltaje1f=([gcs,'/','Fotodetector']);
Senalf=get_param(Current2Voltaje1f,'sel');
Frecuenciaf=get_param(Current2Voltaje1f,'frec');
%==============================================
switch (Frecuenciaf)
case '1310'
switch (Senalf)
case 'STS-12/STM-4'
Rof=60; %Las unidades de la resistencia son "Ohmios".
Ibiasf=0.012;
case 'STS-48/STM-16'
Rof=36.6666666667; %Las unidades de la resistencia son "Ohmios".
Ibiasf=0.012;
otherwise
Rof=43.3333333333; %Las unidades de la resistencia son "Ohmios".
Ibiasf=0.011;
end
case '1550'
switch (Senalf)
case 'STS-12/STM-4'
Rof=60; %Las unidades de la resistencia son "Ohmios".
Ibiasf=0.012;
case 'STS-48/STM-16'
Rof=31.4285714285; %Las unidades de la resistencia son "Ohmios".
Ibiasf=0.012;
otherwise
Rof=20; %Las unidades de la resistencia son "Ohmios".
Ibiasf=0.02;
end
end
set_param(Current2Voltaje1f,'Ibiasf',num2str(Ibiasf));
set_param(Current2Voltaje1f,'Rof',num2str(Rof));
end
if isempty(find_system(gcs,'Name','Fotodetector1'))~=1
Current2Voltaje11f=([gcs,'/','Fotodetector1']);
Senal11f=get_param(Current2Voltaje11f,'sel');
Frecuencia11f=get_param(Current2Voltaje11f,'frec');
%==============================================
switch (Frecuencia11f)
case '1310'
switch (Senal11f)
case 'STS-12/STM-4'
Ro11f=60; %Las unidades de la resistencia son "Ohmios".
Ibias11f=0.012;
case 'STS-48/STM-16'
Ro11f=36.6666666667; %Las unidades de la resistencia son "Ohmios".
Ibias11f=0.012;
otherwise
Ro11f=43.3333333333; %Las unidades de la resistencia son "Ohmios".
Ibias11f=0.011;
end
case '1550'
switch (Senal11f)
case 'STS-12/STM-4'
Ro11f=60; %Las unidades de la resistencia son "Ohmios".
Ibias11f=0.012;
case 'STS-48/STM-16'
Ro11f=31.4285714285; %Las unidades de la resistencia son "Ohmios".
Ibias11f=0.012;
otherwise
Ro11f=20; %Las unidades de la resistencia son "Ohmios".
Ibias11f=0.02;
end
end
set_param(Current2Voltaje11f,'Ibiasf',num2str(Ibias11f));
set_param(Current2Voltaje11f,'Rof',num2str(Ro11f));
end
if isempty(find_system(gcs,'Name','Fotodetector2'))~=1
Current2Voltaje22f=([gcs,'/','Fotodetector2']);
Senal22f=get_param(Current2Voltaje22f,'sel');
Frecuencia22f=get_param(Current2Voltaje22f,'frec');
%==============================================
switch (Frecuencia22f)
case '1310'
switch (Senal22f)
case 'STS-12/STM-4'
Ro22f=60; %Las unidades de la resistencia son "Ohmios".
Ibias22f=0.012;
case 'STS-48/STM-16'
Ro22f=36.6666666667; %Las unidades de la resistencia son "Ohmios".
Ibias22f=0.012;
otherwise
Ro22f=43.3333333333; %Las unidades de la resistencia son "Ohmios".
Ibias22f=0.011;
end
case '1550'
switch (Senal22f)
case 'STS-12/STM-4'
Ro22f=60; %Las unidades de la resistencia son "Ohmios".
Ibias22f=0.012;
case 'STS-48/STM-16'
Ro22f=31.4285714285; %Las unidades de la resistencia son "Ohmios".
Ibias22f=0.012;
otherwise
Ro22f=20; %Las unidades de la resistencia son "Ohmios".
Ibias22f=0.02;
end
end
set_param(Current2Voltaje22f,'Ibiasf',num2str(Ibias22f));
set_param(Current2Voltaje22f,'Rof',num2str(Ro22f));
end
if isempty(find_system(gcs,'Name','Fotodetector3'))~=1
Current2Voltaje33f=([gcs,'/','Fotodetector3']);
Senal33f=get_param(Current2Voltaje33f,'sel');
Frecuencia33f=get_param(Current2Voltaje33f,'frec');
%==============================================
switch (Frecuencia33f)
case '1310'
switch (Senal33f)
case 'STS-12/STM-4'
Ro33f=60; %Las unidades de la resistencia son "Ohmios".
Ibias33f=0.012;
case 'STS-48/STM-16'
Ro33f=36.6666666667; %Las unidades de la resistencia son "Ohmios".
Ibias33f=0.012;
otherwise
Ro33f=43.3333333333; %Las unidades de la resistencia son "Ohmios".
Ibias33f=0.011;
end
case '1550'
switch (Senal33f)
case 'STS-12/STM-4'
Ro33f=60; %Las unidades de la resistencia son "Ohmios".
Ibias33f=0.012;
case 'STS-48/STM-16'
Ro33f=31.4285714285; %Las unidades de la resistencia son "Ohmios".
Ibias33f=0.012;
otherwise
Ro33f=20; %Las unidades de la resistencia son "Ohmios".
Ibias33f=0.02;
end
end
set_param(Current2Voltaje33f,'Ibiasf',num2str(Ibias33f));
set_param(Current2Voltaje33f,'Rof',num2str(Ro33f));
end
if isempty(find_system(gcs,'Name','Fotodetector4'))~=1
Current2Voltaje44f=([gcs,'/','Fotodetector4']);
Senal44f=get_param(Current2Voltaje44f,'sel');
Frecuencia44f=get_param(Current2Voltaje44f,'frec');
%==============================================
switch (Frecuencia44f)
case '1310'
switch (Senal44f)
case 'STS-12/STM-4'
Ro44f=60; %Las unidades de la resistencia son "Ohmios".
Ibias44f=0.012;
case 'STS-48/STM-16'
Ro44f=36.6666666667; %Las unidades de la resistencia son "Ohmios".
Ibias44f=0.012;
otherwise
Ro44f=43.3333333333; %Las unidades de la resistencia son "Ohmios".
Ibias44f=0.011;
end
case '1550'
switch (Senal44f)
case 'STS-12/STM-4'
Ro44f=60; %Las unidades de la resistencia son "Ohmios".
Ibias44f=0.012;
case 'STS-48/STM-16'
Ro44f=31.4285714285; %Las unidades de la resistencia son "Ohmios".
Ibias44f=0.012;
otherwise
Ro44f=20; %Las unidades de la resistencia son "Ohmios".
Ibias44f=0.02;
end
end
set_param(Current2Voltaje44f,'Ibiasf',num2str(Ibias44f));
set_param(Current2Voltaje44f,'Rof',num2str(Ro44f));
end
if isempty(find_system(gcs,'Name','Fotodetector5'))~=1
Current2Voltaje55f=([gcs,'/','Fotodetector5']);
Senal55f=get_param(Current2Voltaje55f,'sel');
Frecuencia55f=get_param(Current2Voltaje55f,'frec');
%==============================================
switch (Frecuencia55f)
case '1310'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -