problem plotting complex function
3 views (last 30 days)
Show older comments
Sara on 11 Dec 2011
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)
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];
subplot(211); plot(w,real(eps_compl)); title('real impedence');
subplot(212); plot(w,imag(eps_compl)); title('imaginary impedence');
Mohsen Davarynejad on 11 Dec 2011
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) = ...
More Answers (0)
Find more on Subplots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!