I know Max and Min values and indexes from original vector. I want to plot(x aixis is index number) these values to get trends.
4 ビュー (過去 30 日間)
古いコメントを表示
hallo
I want to make a plot which connect local max and min values. I want to simplify my orignal plot with this method. I got max and min indexes and values but I dont know how to plot these values together. help me
Thanks.
1 件のコメント
Vaidyanathan Thiagarajan
2017 年 11 月 2 日
編集済み: Vaidyanathan Thiagarajan
2017 年 11 月 2 日
Hi,
Can you please post your code and the plot that you would expect the code to create? It is not clear what your objectives are? Are you using the optimization toolbox? Please provide us with more details.
Best Regards,
Vaidyanathan
回答 (1 件)
Jos (10584)
2017 年 11 月 2 日
You question is somewhat unclear, but I will make an educated guess. Assuming the data looks like this:
IndexNum = [ 1 2 5 9] ;
MinValues = [ 1 3 7 11] ;
MaxValues = [11 15 22 34] ;
You can make a plot connecting all MinValues and connecting all Maxvalues:
plot(IndexNum, MinValues ,'bo-',IndexNum, MaxValues,'rs-') ;
or you can make a plot connecting a MinValue to a MaxValue, for each index:
plot([IndexNum ; IndexNum],[MinValues ; MaxValues],'b^:')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!