Why does the line plot depend on the generator type in a for loop ?
이전 댓글 표시
I have :
- a set of points in two dimensions given by their coordinates x_stations and y_stations;
- a set of couples of points given by the indices of point 1 (couples_st1) and point 2 (couples_st2) for each couple;
- a subset i_subset of those couples
I would like to plot i_subset graphically as lines linking point 1 and point 2 for each couple in the subset.
The problem : depending how I am looping on i_subset :
for i = i_subset
i_couple = i;
% some code...
% generate plot
% ouptut the plotted vectors
end
or
for i = 1:length(i_subset)
i_couple = i_subset(i);
% some code ...
% generate plot
% ouptut the plotted vectors
end
I get the same output of plotted vectors, but not the same plots. Why ?
A minimal example is enclosed with input data. Just run "main_minimal_example.m".
main_minimal_example
Thank you !
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

