I get an error message, "Error using * ", every time I run any MATLAB script or use the Command Window and without ever using a function "join" referenced in the description.

I get the following error message every time I run any Matlab script or use the Command Window. I do not use the "join" function file at all, ever.
Error using *
Invalid data type. Argument must be numeric, char, or logical.
Error in join (line 12)
Error in internal.matlab.datatoolsservice.WorkspaceListener.dispatchWSEvent
Error in internal.matlab.datatoolsservice.WorkspaceListener.workspaceUpdatedFromCCP
There appears to be two "join" function files in the Matlab program files. One file has unreadable contents and the one is a function file only performs the operation a*b on line 12 (the last line).

10 Comments

What do you get when you type
which -all join.m
/MATLAB/toolbox/matlab/strfun/join.m /MATLAB/toolbox/matlab/datatypes/tabular/@tabular/join.m % Shadowed tabular method /MATLAB/toolbox/matlab/bigdata/@tall/join.m % Shadowed tall method /MATLAB/toolbox/parallel/array/distributed/@codistributed/join.m % Shadowed codistributed method /MATLAB/toolbox/pde/pde/@fegeometry/join.m % Shadowed fegeometry method /MATLAB/toolbox/shared/statslib/@dataset/join.m % Shadowed dataset method
?
Can you include the part of your code that produces the error message ?
Thank you for responding. It does not matter what instruction I put in the Command Window or which existing script I run, the calculation is completed correctly but the answer is always followed by this bizarre error message - Error using *.
The computer in question is on an air-gapped network, so it takes a while...
>> which -all join.m
C:\Program Files\MATLAB\R2026a\toolbox\matlab\strfun\join.m
C:\Program Files\MATLAB\R2026a\toolbox\matlab\datatypes\tabular\@tabular\join.m
C:\Program Files\MATLAB\R2026a\toolbox\matlab\bigdata\@tall\join.m
That's what AI suggests:
The stack trace reveals the exact source of your issue: MATLAB's graphical user interface (the UI) is crashing while attempting to automatically refresh your Workspace browser window. [1]
The error is not originating from your own code or equations. Instead, every time a command executes, an internal background service (WorkspaceListener) scans your newly created or modified variables to update the visual list in your Workspace window. During this background scan, MATLAB triggers its internal join function. However, one of the variables sitting in your Workspace has an unsupported, complex, or corrupted data type (such as an empty object, an unusual cell array, or a misconfigured custom class) that the background UI rendering engine cannot process. [1, 2, 3]
How to Fix It Immediately
1. Pinpoint the broken variable
You need to identify which variable is breaking the Workspace browser. Run this command to check the underlying data classes of your current variables:
whos
Look for any variable with an unusual class name, a size of 0x0, or a complex custom object data type. [1]
2. Clear the workspace to reset the UI
To confirm the Workspace browser is stuck on a bad variable, wipe the active memory:
clear
Once the workspace is empty, type any basic calculation (e.g., 2 + 2). If the error disappears, a corrupted variable in your previous session was definitively causing the crash.
3. Close the Workspace browser panel
If you must work with that specific complex data type and cannot clear it, you can stop the error messages by hiding the UI window that is crashing:
  • Manually close or minimize the Workspace panel in your MATLAB Desktop layout.
  • Alternatively, run this command to temporarily switch to a layout that doesn't actively render it:
desktop
(Go to the Home tab -> Layout -> select Command Window Only)
4. Check for overloaded system keywords
If the error occurs even when the workspace is completely empty, you may have accidentally named a script or a variable join.m. Verify this by running:
which -all join
If the top result points to a file you created rather than toolbox/matlab/strfun/join.m, rename or delete your custom file to restore standard system functionality.
If this doesn't help, contact support:
Thank you. It turned out to be a file that was 12 years old, yet this error message only just showed up now. I truly appreciate you help.
@Craig, I'm somewhat confused about the above comment regarding it being a 12-yr old file as opposed to a variable in current workspace? Can you amplify the above comment a little more as to what actual was the file and how it created the warning?
As a side note, I'd think this deserves a formal support notification of unexpected and undesirable behavior; it would seem to me the background task should have sufficient internal error handling to be able to catch out and report the offending entry rather than the user having to try to figure it out by process of elimination.
The output of "which -all join" is incompatible with your statement that "There appears to be two "join" function files in the Matlab program files. One file has unreadable contents and the one is a function file only performs the operation a*b on line 12 (the last line)." The join.m included as part of MATLAB doesn't include the * symbol at all. Line 12 of it is:
dbtype 12 join.m
12 try
Unless you've accidentally modified the join.m included with MATLAB (a Bad Idea) you probably have at least one additional join.m that's taking precedence over the one included with MATLAB.
@dpb, the background task is running MATLAB code as part of its execution. It makes an assumption that the MATLAB code it's depending on behaves the way "it's supposed to" (according to its documentation for documented functions). If that assumption is violated, MATLAB may throw an error. Could MATLAB determine why that error is being thrown (its root cause) and give a more informative message? That's not easy for a human to determine at times!
The internal code could wrap its body in a try/catch block and try to give some sort of more informative message. In some cases, MATLAB does. For example, in Handle Graphics if you change the data for a graphics object to incompatibly sized data you could argue it ought to throw an error, but Handle Graphics catches that error and issues a warning instead. Note that the message says "Warning: Error".
h = plot(1:10, 1:10);
h.XData = 1:11;
Warning: Error creating or updating Line
Error in value of one or more of the following properties: XData, YData
Array is wrong shape or size
@Steven Lord -- if the error were really from the processing of the workspace variables, it seemed as though it should have been able to know which one it was on when the problem occurred. Mayhaps that it apparently is an overload builtin may have broken things tpo badly to be able to backtrack the call stack to figure that out? Or, at least, it was a design decision to not add that much effort into the error handling to not overload the background task from a performance viewpoint?
Just a passing thought as if were feasible would be helpful to know the root cause directly...
I don't work on the Workspace panel, but from the fact that it's join that's being called I'm guessing it's trying to do something like stitching together the description of a variable:
attributes = "complex";
datatype = "double";
shape = "scalar";
join([attributes, datatype, shape])
ans = "complex double scalar"
One way to test if it is the Workspace panel that's causing this is to close it and see if the error still occurs.
I haven't ever had it open so I wouldn't know...... :>)
I use the command window and the editor/debugger and pretty-much ignore all the rest...

Sign in to comment.

Answers (1)

The offending file named "join.m" was included in a folder from a 3rd party (for modeling Clifford Algebra) that contained a function file with that same name. Once I removed that folder from the Matlab path, then the error message stopped occuring (when I ran any Matlab program or when I used the Command Window for direct calculations). I understand now why the error message has been occuring. What mystifies me was that this repeating error message should have been occuring for the past 12 years (when I installed the 3rd party program folder) rather than just starting a couple of days ago.
The problem is completely resolved now so I do not have anything else to report.

1 Comment

@Craig, gotcha', thanks for the clarification; I hadn't quite followed the breadcrumbs.
No chance the app didn't actually add the folder before, maybe, is there? Otherwise, would seem there would have to have been some change in the background function itself. May be one of those imponderables to remain a mystery.

Sign in to comment.

Products

Release

R2026a

Asked:

on 2 Sep 2026 at 18:56

Edited:

dpb
on 3 Sep 2026 at 19:53

Community Treasure Hunt

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

Start Hunting!