How do I plot two arrays as axes?

Suppose I have two arrays:
A = [10^10 10^11 10^12 10^13 10^14 10^15];
B = [1.1 2.3 0.1 0.23 0.5 1.3];
where A will be the x axis (discrete points) and B will be the y axis. The elements of the same index are associated with each other (1.1 at 10^10, and so on). How can I plot it that way?
Additionally, suppose I have variations of array B like:
B1, B2, B3, B4, B5, B6, ...
where all arrays have the same number of elements. How do I stack each plot for B arrays in one figure (since the x-axis, array A, is the same for all B arrays)?

2 件のコメント

madhan ravi
madhan ravi 2019 年 1 月 24 日
plot(A,B) ?
Stephen23
Stephen23 2019 年 1 月 24 日
"Additionally, suppose I have variations of array B like:"
B1, B2, B3, B4, B5, B6, ...
Numbered variables is a sign that you are doing something wrong.
"How do I stack each plot for B arrays in one figure "
Simply store each output as one column of an array, and then plot that array.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMatrices and Arrays についてさらに検索

製品

リリース

R2018b

タグ

質問済み:

2019 年 1 月 24 日

コメント済み:

2019 年 1 月 24 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by