フィルターのクリア

Creating a y axis which is half log and half linear

3 ビュー (過去 30 日間)
subharthi chowdhuri
subharthi chowdhuri 2016 年 4 月 28 日
コメント済み: Walter Roberson 2016 年 4 月 28 日
I am stuck with a problem where I need to create the yaxis such that while plotting for y<=0.5, it is in the linear scale and for y>=0.5 it is in the log scale. I have searched a lot on many Matlab previous posts but could not get a satisfactory way. I tried to follow one post where it was mentioned how to split the x axis by creating two different subplots and then position them in such a way that those get merged. One problem which I faced while trying to repeat that for the y axis is, the values which I have for the y, do not contain exactly 0.5 and hence when I tried to merge the subplots a discontinuity resulted at the match point. I would be very grateful if someone from here could give a reasonable solution.

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 4 月 28 日
You will need to interpolate on x and y to get a breakpoint at 0.5
  2 件のコメント
subharthi chowdhuri
subharthi chowdhuri 2016 年 4 月 28 日
thank you for your suggestion. Well the data which I am using there interpolation may not be correct. I was having one another thought that is, if I break the xaxis lets say for x<=1.365, I need the y values in log and for x>=1.365, I need the y values in linear, will that be possible in Matlab?
Walter Roberson
Walter Roberson 2016 年 4 月 28 日
It is the same either way: you need to interpolate to find the value at the breakpoint. However, the interpolation on x might be easier:
interp1(x, y, XPositionOfBreakpoint)

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

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by