plotting of graph for maximum and minimum values
    7 ビュー (過去 30 日間)
  
       古いコメントを表示
    
    sampath kumar punna
 2019 年 10 月 24 日
  
    
    
    
    
    回答済み: Subhadeep Koley
    
 2019 年 10 月 29 日
                X       Y
   106   163
   128   155
   139   163
   161   155
    83   148
   105   140
   116   148
   138   140
   124   130
   146   122
   157   130
   179   122
   101   115
   123   107
   134   115
   156   107
   111   152
   133   144
   144   152
   166   144
    88   137
   110   129
i wanted to plot a graph for top 5 points where x is minimum and y is maximum 
1 件のコメント
  David Hill
      
      
 2019 年 10 月 24 日
				Do you want maximum different between y-x? Otherwise, your instructions don't make since.
採用された回答
  Subhadeep Koley
    
 2019 年 10 月 29 日
        I am assuming that you want to plot a graph for top 5 points where X is sorted in ascending manner, and Y is sorted in descending manner. The following code might help.
(Download the attached your_Data.mat file)
load('your_Data');
x=your_Data(:,1);
y=your_Data(:,2);
% Sort X data
x_sorted=sort(x);
% Sort Y data
y_sorted=sort(y,'desc');
% Plot X~Y top 5 points where X is sorted in ascending manner, and Y is sorted in descending manner
figure;plot(x_sorted(1:5),y_sorted(1:5));
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Shifting and Sorting Matrices についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


