Countour function And meshgrid

How do you part B and this is what I have for both A and B and I've attached the question and what is supposed to look like.
% code
% Code for part A
% Given Values
C = 15E-6;
Vm = 24;
L = 240E-3;
R = [10:1:40];
f = linspace(60,110,31);
[f2, R2] = meshgrid(f, R);
w = 2*pi*f;
w2 = 2*pi*f2;
% Compute function surface.
Top = Vm;
Bottom = sqrt(R2.^2 + (w2*L-(1./(w2.*C))).^2);
I = (Top./Bottom)';
% Now plotting everything.
mesh(R, w, I);
ylabel(' w (angular frequency)')
xlabel('R Ohms')
zlabel('I Amps')
view(gca,[-133.1 34.8]);
grid('on');
% Code for part B figure contour(w,R,I) xlabel('w (angular frequency)') ylabel('I (amps)')
end

Réponses (0)

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by