Resacaling an array to align and plot beside another
2 ビュー (過去 30 日間)
古いコメントを表示
I have two arrays that when plotted should align. What is the best way to scale one of these arrays so the largest two maximums are inline? I am trying to show the maximums should all align, the height (intensity) is unimportant right now.
The arrays are both 1 X 600, however I have removed every second element of one of them to make them plot together.
2 件のコメント
Jan
2017 年 11 月 30 日
What kind of arrays do you have? Matrices, vectors, multi-dimensional cell arrays? How is "align" defined? What does "largest two maximum are inline" mean? Why did you remove every 2nd element?
回答 (1 件)
Thorsten
2017 年 11 月 30 日
x = 1:600; A = rand(1, 600);
y = 1:2:600; B = rand(1, 300);
plot(x, A, y, B)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!