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;

 採用された回答

Image Analyst
Image Analyst 2018 年 10 月 6 日

0 投票

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by