hello, i am using matlab2016a student version, i was trying to construct a tree for that i have downloaded functions and i treid to drag and add them in the current folder then the problme started

everything went down, it is displaying so many errors for basic functions in matlab like when i typed fdatool in my command prompt it said some error, i uninstalled it and again installed it by downloading anothe setup file from my matlab account then the worst happened MY TOOLBOXES they got reduced by half i am pretty confused if anyone knows how to solve it please guide me i really need your advice. Thanks

1 Comment

This appears in the command window when i start my MATLAB:
Struct contents reference from a non-struct array object.
Error in strncmp (line 28)
K = strncmp(obj.Node, str, n);
Error in matlabrc (line 73)
if strncmp(computer,'PC',2)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.mathworks.mlwidgets.graphics.ModelStateFactory.createNoSelectionModelState(ModelStateFactory.java:251)
at com.mathworks.mlwidgets.graphics.PlotToolSetFactory$3.parseComplete(PlotToolSetFactory.java:123)
at com.mathworks.mlwidgets.graphics.ModelStateFactory$ProductInfoListener$1$1.run(ModelStateFactory.java:1032)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Sign in to comment.

 Accepted Answer

It looks to me as if you have accidentally introduced your own strncmp.m that is interfering with the official one. What shows up for
which -all strncmp
I would suggest you start with
restoredefaultpath

2 Comments

This came up when i typed restoredefaultpath Struct contents reference from a non-struct array object.
Error in strncmp (line 28) K = strncmp(obj.Node, str, n);
Error in restoredefaultpath (line 22) if strncmp(computer,'PC',2)
Struct contents reference from a non-struct array object.
Thanks Mr Robertson

Sign in to comment.

More Answers (1)

when i typed clc to clear command window this dialog box comes up saying "Error using eval undefined function 'workspacefunc' for input arguments of type 'struct'"

Categories

Community Treasure Hunt

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

Start Hunting!