フィルターのクリア

how to plot using two x axes

3 ビュー (過去 30 日間)
Abdulaziz
Abdulaziz 2014 年 7 月 11 日
コメント済み: Abdulaziz 2014 年 7 月 11 日
Hi everyone, Please I need help. I have two matrices of speeds at different locations. The matrices generated by two different models. every two corresponding columns were obtained at particular axial position along vertical line. I want to plot each two columns at assigned position (axial location). that means top x axes is for axial position and the bottom is for speed. while y is for vertical position. Please see the attached file hand sketch for illustration

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 7 月 11 日
編集済み: Azzi Abdelmalek 2014 年 7 月 11 日
Use plotyy function
Look at this example
x1=1:0.1:10
x2=1:0.1:10
y1=sin(x1)
y2=cos(x2)./x2
[ax,h1,h2] = plotyy(x1,y1,x2,y2)
xlabel('u(m/s)')
ylabel('y(mm)')
set(ax(2),'xaxislocation','top')
hlx=get(ax(2),'xlabel')
set(hlx,'string','x(mm)')
  1 件のコメント
Abdulaziz
Abdulaziz 2014 年 7 月 11 日
Thank you Azzi for your help.
If you can see the attached file. every two curves are at different axial locations. the one you suggested will work with some adjustment but give all the curves at one location. May be I should consider plot on 3D

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

カテゴリ

Help Center および File ExchangeTwo y-axis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by