Network drop Graph in Matlab
이전 댓글 표시
I want to plot a graph like this in Matlab
How we can do this ?
댓글 수: 7
Geoff Hayes
2022년 5월 5일
@Vartika Agarwal - do you have the data needed to plot this graph? If so, what have you tried to do so far?
Vartika Agarwal
2022년 5월 6일
Vartika Agarwal
2022년 5월 7일
Geoff Hayes
2022년 5월 8일
See plot for details on how to do a basic plot like in the graph. You will need some data though...is that something you can simulate?
Geoff Hayes
2022년 5월 9일
@Vartika Agarwal's answer moved her
I have the data for simulating the graph
See the following attachment and help me how i can do this ?
Geoff Hayes
2022년 5월 9일
@Vartika Agarwal - to be clear, the "data" you have is just the attached picture?
Vartika Agarwal
2022년 5월 10일
답변 (1개)
BhaTTa
2025년 3월 11일
Hey @Vartika Agarwal, To visually represent the network drop as a falling line at X = 81, you can add a vertical line that drops from the interpolated Y value at 81 to a lower Y value. Refer to MATLAB script below and take it as a reference and modify it accordingly:
% Define the data
X = [73, 77, 81, 85, 89, 93, 100];
Y = [1, 2, 3];
% Assuming Y values need to be repeated or interpolated for X values
% Example: Linear interpolation
Y_interp = interp1([73, 100], [1, 3], X, 'linear');
% Plot the data
figure;
plot(X, Y_interp, 'b-o'); % Plot with blue line and circle markers
hold on;
% Highlight the network drop at 81
% Interpolated Y value at 81
Y_drop_start = Y_interp(3);
% Define the drop to a lower Y value, e.g., 0.5
Y_drop_end = 0.5;
% Plot the falling line to represent the drop
plot([81, 81], [Y_drop_start, Y_drop_end], 'r--', 'LineWidth', 2); % Red dashed line
% Add labels and title
xlabel('X-axis');
ylabel('Y-axis');
title('Increasing Slope with Network Drop');
% Add legend
legend('Network Data', 'Network Drop at 81');
% Display grid
grid on;
% Hold off to stop adding to the plot
hold off;
카테고리
도움말 센터 및 File Exchange에서 Networks에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!