フィルターのクリア

ylim return type change

4 ビュー (過去 30 日間)
Ian Nichols
Ian Nichols 2019 年 9 月 12 日
編集済み: Adam Danz 2020 年 2 月 7 日
Yesterday, Matlab started returning querries to ylim as type cell, containing a 2 element double vector, rather than the 2 element double vector itself. Any ideas why?
For example:
figure; plot( 1 : 5)
ylim
should return:
ans =
1 5
But, now it returns:
ans =
1×1 cell array
{1×2 double}
This happened during a session!
I have to use cell2mat, now:
>> cell2mat( ylim)
ans =
1 5
I'm using R2018a.
I haven't overloaded ylim:
>> which ylim
C:\Program Files\MATLAB\R2018a\toolbox\matlab\graph3d\ylim.m
and ylim.m is:
[SL: Removed the text of the ylim function included in MATLAB. It does appear to be the version included in release R2018a.]
What has happened?
  19 件のコメント
Walter Roberson
Walter Roberson 2020 年 2 月 7 日
MATLAB is not itself restricting access to the installed files. MATLAB relies upon operating system access rights checking. At some point Windows 7 added controls to prevent non-privileged users from writing under Program Files, but Windows disables that protection for processes running as Administrator, because running as Administrator is intended to mean that you have rights to change nearly everything.
Adam Danz
Adam Danz 2020 年 2 月 7 日
I see. Thanks, Walter!

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

回答 (1 件)

Ram Vijayaragavan
Ram Vijayaragavan 2020 年 2 月 6 日
Hi Ian,
If you dont want to use the cell2mat function,one possible workaround can be
ax = gca %Get the current axis
ax.YLim
I Hope this solves your issue.
  3 件のコメント
Ian Nichols
Ian Nichols 2020 年 2 月 6 日
編集済み: Ian Nichols 2020 年 2 月 6 日
Thank you for your suggestions. EIther may work (not tested), but ylim should work, and doesn't; I shouldn't need a work around!
Adam Danz
Adam Danz 2020 年 2 月 6 日
Agreed... something's fishy.... hmmmmm

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

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by