Plot3 and vector match issue
1 view (last 30 days)
Show older comments
hello all,
I want to plot three functions (f1, f2, Fall) in different vector sizes (x,y) using plot3. Is there a way to do that?
if in case the only way is to have these vectors matched, how can match their sizes in matlab?
here is the code:
x = 1e3:10e6; \\ Freq of operation (big vector)
y = 3e-3:500e-3; \\resistance in the circuit
a=1e-6; \\ value that I change every time to get the optimized one
f1 = 5.*x ;
f2 = sqrt ((1/(a^2).*(x.^2)) + (5.*(Ron.^2));
Fall = f1 + f2;
figure (1); plot3(x,y,f1)
figure (2); plot3(x,y,f2);
figure (3); plot3(x,y,Fall);
thanks
0 Comments
Accepted Answer
KSSV
on 24 Feb 2017
N = 10000 ; % can be changed
% x = 1e3:10e6; % Freq of operation (big vector)
x = linspace(1e3,10e6,N) ;
% y = 3e-3:500e-3; %resistance in the circuit
y = linspace(3e-3,500e-3,N) ;
a=1e-6; % value that I change every time to get the optimized one
f1 = 5.*x ;
f2 = sqrt ((1/(a^2).*(x.^2)) + (5.*(Ron.^2)));
Fall = f1 + f2;
figure (1); plot3(x,y,f1)
figure (2); plot3(x,y,f2);
figure (3); plot3(x,y,Fall);
0 Comments
More Answers (1)
See Also
Categories
Find more on 2-D and 3-D Plots 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!