How can I plot 3 defined variables on a loglog scale with 2 x-axis with same y-axis.

1 回表示 (過去 30 日間)
Jacob Bradley
Jacob Bradley 2018 年 11 月 21 日
コメント済み: dpb 2018 年 11 月 22 日
load Cmp2.txt;
p= Cmp2(:,1);
u= Cmp2(:,2);
h=(p/(9.8*1000));
ii=(h/0.0011);
K=(u./ii);
Re=(1000*u*4e-4)/(0.001);
loglog(ii,K,'o') %This is the plot that I would like to add the third variable (Re).
title('K vs i'), xlabel('i (-)'), ylabel('K (m/s)')
axis([1e-5,10,0.15,0.5]);
%How Can alter the third x axis parameters/limits to fit the data better?
  1 件のコメント
dpb
dpb 2018 年 11 月 22 日
What do you want plotted, specifically? Need the data to be able to see what you've got.
Certainly it's possible to have two x-axes similar to two y-axes. TMW built yyaxis for the latter; hard to understand why they didn't go ahead with x as well, but there's example of what to do specifically and I suspect somebody else has been fed up enough to have posted a routine on the File Exchange.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLog Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by