how to develop function to calculate slope eficience

Hi, I'm a newbie here and I need help to develop a function to solve this question.
I Made this, but it does not work:
function [Pload,P2od] = eficiencia_incremental(rd,Rload,N2,CD,RD,f)
%Funcao para calcular enfiencia incremental do photodiodo
% com dependencia da frequencia
omega = 2*pi*f;
Pload=rd^2*Rload*N2^2;
P2od=(1i*omega*CD(RD+N2^2+Rload)+1)^2;
end
The error
eficiencia_incremental(0.7,50,1,5*10^-12,1,60)
Index exceeds matrix dimensions.
Error in eficiencia_incremental (line 6)
P2od=(1i*omega*CD(RD+N2^2+Rload)+1)^2;

 Réponse acceptée

CD is a scalar, not a vector. Perhaps you meant:
P2od = 1i * omega * CD * (RD + N2^2 + Rload) + 1) ^ 2;

Plus de réponses (0)

Catégories

En savoir plus sur Operators and Elementary Operations dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by