problem plotting complex function
2 ビュー (過去 30 日間)
古いコメントを表示
Hi everybody! i don't understand why, plotting the complex function eps_compl, separating imag and real part, i obtain always a costant value in frequency, when it should vary with frequency. Besides i'd like to work with a larger range of frequency but it gives me the error "Maximum variable size allowed by the program is exceeded."
the program is this, (i->i^2=-1)
sigma=0.05;
eps_inf=4.0;
eps_cero=8.842*10^(-12);
delta_eps=[47.0 3500 2.5*10^5 3*10^7];
tau=[7.96*10^(-12) 198.94*10^(-9) 79.58*10^(-6) 4.547*10^(-3) ];
alfa=[0.1 0.22 0.22 0];
w=10:.05:10^2;
slen=length(w);
eps_compl=zeros(slen);
for q=1:slen
for k=1:4
eps_compl=sigma/(i*w(q)*eps_cero)+eps_inf+(delta_eps(k)/(1+(i*w(q)*tau(k))^(1-alfa(k))));
end
end
figure(1);
subplot(211); plot(w,real(eps_compl)); title('real impedence');
subplot(212); plot(w,imag(eps_compl)); title('imaginary impedence');
Thank you!
0 件のコメント
採用された回答
Mohsen Davarynejad
2011 年 12 月 11 日
The problem is that eps_compl is just a single number, and not an array. You compute eps_compl for every point, but you do not store them. Assign sapce to eps_compl by something like:
eps_compl = ones(q,k) % if the size of eps_compl is q*k
and in your for loop add something like this:
eps_compl(q,k) = ...
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!