yyaxis left with Invalid text character error

I dont know if anyone ever ran into this but its killing me.
I have been trying to use yyaxis on Matlab 2020a as well as Matlab 2019a/b, but all I get is this error:
Error: File: union.m Line: 1 Column: 1
Invalid text character. Check for unsupported symbol, invisible character, or
pasting of non-ASCII characters.
Error in matlab.graphics.internal.YYAxisEventManager/addAxes
Error in matlab.graphics.internal.YYAxisEventManager
Error in matlab.graphics.internal.YYAxisEventManager.registerAxes
Error in yyaxis
Error in yyaxis
I have tried:
1. calling yyaxis independently in the command line, but its not working.
2. reinstalling Matlab, not working
3. different versions of Matlab (2020a, 2019a, 2019b), not working
4. different OS (Mac, PC), not working
I am really out of my depth here, please, if anyone know how to solve this...
Thanks

6 Comments

which -all union
what shows up for that?
Yeah that was what's bugging me.
All I did was type in yyaxis in the command line
>> yyaxis right
Error: File: union.m Line: 1 Column: 1
Invalid text character. Check for unsupported symbol, invisible character, or
pasting of non-ASCII characters.
Error in matlab.graphics.internal.YYAxisEventManager/addAxes
Error in matlab.graphics.internal.YYAxisEventManager
Error in matlab.graphics.internal.YYAxisEventManager.registerAxes
Error in yyaxis
Error in yyaxis
When you give the command
which -all union
then what shows up on your display?
It looks as if you have your own union.m that is interfering with MATLAB.
I suspect that you have installed a third party toolbox that has an R2013a compatibility section that the installation instructions say you are to remove if you are running a newer version -- that is, the toolbox included functions intended to bring older releases up to R2013a compatibility and then the toolbox was written to R2013a standards. But the code was not even correct for R2013a timeframe, as it included functions such as union() that had been defined long before, somewhere around MATLAB R11 (mid 1990's)
I am sorry I didn't realize that I should type in the which -all union command...
When I type in that it shows up this
>> which -all union
/Users/yp1017/Downloads/ExpData/Juice_Choice/Code/ToolBoxes/ndt.1.0.4/octave_code/union.m
/Applications/MATLAB_R2020a.app/toolbox/matlab/ops/@cell/union.m % cell method
/Applications/MATLAB_R2020a.app/toolbox/matlab/datatypes/duration/@duration/union.m % duration method
union is a built-in method % slreq.datamodel.AttributeKindEnum method
union is a built-in method % slreq.datamodel.AttributeRegType method
union is a built-in method % slreq.datamodel.AttributeTypeEnum method
union is a built-in method % slreq.datamodel.CustomIdNumbering method
union is a built-in method % slreq.datamodel.MappingDirectionEnum method
/Applications/MATLAB_R2020a.app/toolbox/matlab/datatypes/datetime/@datetime/union.m % datetime method
union is a built-in method % matlab.lang.OnOffSwitchState method
union is a built-in method % matlab.internal.polygon.builtin.cpolygon method
union is a built-in method % matlab.graphics.controls.internal.ToolbarValidator method
union is a built-in method % matlab.internal.timer.CallBackTypeEnum method
union is a built-in method % matlab.internal.timer.ObjectVisibilityEnum method
union is a built-in method % matlab.internal.timer.BusyModeEnum method
union is a built-in method % matlab.internal.timer.ExecutionModeEnum method
union is a built-in method % matlab.graphics.shape.internal.util.PointDataTipStyle method
/Applications/MATLAB_R2020a.app/toolbox/matlab/bigdata/@tall/union.m % tall method
/Applications/MATLAB_R2020a.app/toolbox/matlab/datatypes/tabular/@tabular/union.m % tabular method
/Applications/MATLAB_R2020a.app/toolbox/matlab/polyfun/@polyshape/union.m % polyshape method
/Applications/MATLAB_R2020a.app/toolbox/matlab/datatypes/categorical/@categorical/union.m % categorical method
/Applications/MATLAB_R2020a.app/toolbox/shared/statslib/@dataset/union.m % dataset method
/Applications/MATLAB_R2020a.app/toolbox/matlab/ops/union.m
/Users/yp1017/Downloads/ExpData/Juice_Choice/Code/ToolBoxes/ndt.1.0.4/octave_code/union.m
You need to get that off of your path, either by renaming it or deleting it, or using pathtool to remove the directory from your MATLAB path. It is code intended for octave anyhow, so you should not have it on your path when using MATLAB.
(You are not using the package I was thinking of; I do not recall encountering the one you are using.)
thank you it works,
you are my life-saver!!!!

Sign in to comment.

Answers (1)

[Copying down]
/Users/yp1017/Downloads/ExpData/Juice_Choice/Code/ToolBoxes/ndt.1.0.4/octave_code/union.m
You need to get that off of your path, either by renaming it or deleting it, or using pathtool to remove the directory from your MATLAB path. It is code intended for octave anyhow, so you should not have it on your path when using MATLAB.
(You are not using the package I was thinking of; I do not recall encountering the one you are using.)

Categories

Products

Tags

Asked:

on 22 Jan 2021

Answered:

on 23 Jan 2021

Community Treasure Hunt

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

Start Hunting!