Plot3 and vector match issue
조회 수: 9 (최근 30일)
이전 댓글 표시
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
채택된 답변
KSSV
2017년 2월 24일
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
추가 답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!