Problem with variable coder

5 views (last 30 days)
Hello everybody, I have this problem when I run my program.
Undefined variable "coder" or class "coder.Project".
Undefined function or variable 'CC'.
Error in emlckernel
Error in emlckernel
Error in emlckernel
Error in emlcprivate
Error in codegen
I have checked my license and I get succesful returns and I have also execute these commands:
>> restoredefaultpath
>> rehash toolboxcache
>> savepath
Any idea?
Thanks in advance,
Javi
  2 Comments
Image Analyst
Image Analyst on 1 Sep 2017
Show your code where you call coder. Is that in codegen.m? Show what you see when you type "ver" (except delete your license number.) Since this could be an installation issue, you can always call them on the phone for fast and free installation help.
Javier Naranjo
Javier Naranjo on 2 Sep 2017
Edited: Walter Roberson on 25 Oct 2017
This is my ver return:
O
perating System: Linux 4.4.0-1032-aws #41-Ubuntu SMP Mon Aug 14 13:08:44 UTC 2017 x86_64
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB                                                Version 9.2         (R2017a)
MATLAB Coder                                          Version 3.3         (R2017a)
Optimization Toolbox                                  Version 7.6         (R2017a)
Parallel Computing Toolbox                            Version 6.10        (R2017a)
Signal Processing Toolbox                             Version 7.4         (R2017a)
Statistics and Machine Learning Toolbox               Version 11.1        (R2017a)

Sign in to comment.

Accepted Answer

Prashanth Krishnan
Prashanth Krishnan on 7 Sep 2017
From the output of your "ver" command, it seems like you do not have the MATLAB Coder or Simulink Coder products as part of your MATLAB installation. The error you are observing is likely due to this. Please consider installing MATLAB Coder or Simulink Coder in order to resolve the error.
  1 Comment
Javier Naranjo
Javier Naranjo on 12 Sep 2017
Just down Matlab's version I can see "Coder Version 3.3"
Is not that enough?
Thanks for the answer,
Javi

Sign in to comment.

More Answers (2)

Emrah Duatepe
Emrah Duatepe on 25 Oct 2017
Is that problem solved?,I have same problem

Emrah Duatepe
Emrah Duatepe on 25 Oct 2017
Oh sorry I mean I have this problem with Matlab Coder
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException at com.mathworks.toolbox.coder.wfa.CoderStepViewFactory.instantiateUI(CoderStepViewFactory.java:76) at com.mathworks.toolbox.coder.wfa.CoderStepViewFactory.createView(CoderStepViewFactory.java:61) at com.mathworks.toolbox.coder.wfa.core.StepViewFactory.getView(StepViewFactory.java:39) at com.mathworks.toolbox.coder.wfa.core.StepViewFactory.getView(StepViewFactory.java:27) at com.mathworks.toolbox.coder.wfa.core.AbstractStepModel.getNextStep(AbstractStepModel.java:125) at com.mathworks.toolbox.coder.nwfa.CoderNavController.updateNavButtonState(CoderNavController.java:206) at com.mathworks.toolbox.coder.nwfa.CoderNavController.updateNavButtonState(CoderNavController.java:200) at com.mathworks.toolbox.coder.nwfa.CoderNavController.updateAllStatuses(CoderNavController.java:174) at com.mathworks.toolbox.coder.nwfa.CoderNavController.onStepSet(CoderNavController.java:120) at com.mathworks.toolbox.coder.nwfa.CoderNavController.access$300(CoderNavController.java:25) at com.mathworks.toolbox.coder.nwfa.CoderNavController$5.stepSelected(CoderNavController.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.mathworks.toolbox.coder.util.ProxyEventDispatcher$ImmediateInvoker.invoke(ProxyEventDispatcher.java:146) at com.mathworks.toolbox.coder.util.ProxyEventDispatcher$1.invoke(ProxyEventDispatcher.java:130) at com.sun.proxy.$Proxy46.stepSelected(Unknown Source) at com.mathworks.toolbox.coder.wfa.core.AbstractStepModel.setCurrentStep(AbstractStepModel.java:72) at com.mathworks.toolbox.coder.wfa.core.AbstractStepModel.goToNextStep(AbstractStepModel.java:88) at com.mathworks.toolbox.coder.nwfa.CoderNavController$2.actionPerformed(CoderNavController.java:64) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(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.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.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) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mathworks.toolbox.coder.wfa.CoderStepViewFactory.instantiateUI(CoderStepViewFactory.java:74) ... 57 more Caused by: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key f2f.category.fıle at java.util.ResourceBundle.getObject(Unknown Source) at java.util.ResourceBundle.getString(Unknown Source) at com.mathworks.toolbox.coder.plugin.CoderResources.getString(CoderResources.java:29) at com.mathworks.toolbox.coder.fixedpoint.AdvancedSettingsTable.populateRows(AdvancedSettingsTable.java:352) at com.mathworks.toolbox.coder.fixedpoint.AdvancedSettingsTable.populateRows(AdvancedSettingsTable.java:321) at com.mathworks.toolbox.coder.fixedpoint.AdvancedSettingsTable.<init>(AdvancedSettingsTable.java:166) at com.mathworks.toolbox.coder.fixedpoint.AdvancedSettingsTable.<init>(AdvancedSettingsTable.java:99) at com.mathworks.toolbox.coder.wfa.fixedpoint.FixedPointView.<init>(FixedPointView.java:249) ... 62 more Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException at com.mathworks.toolbox.coder.wfa.CoderStepViewFactory.instantiateUI(CoderStepViewFactory.java:76) at com.mathworks.toolbox.coder.wfa.CoderStepViewFactory.createView(CoderStepViewFactory.java:61) at com.mathworks.toolbox.coder.wfa.core.StepViewFactory.getView(StepViewFactory.java:39) at com.mathworks.toolbox.coder.wfa.core.StepViewFactory.getView(StepViewFactory.java:27) at com.mathworks.toolbox.coder.wfa.core.AbstractStepModel.getNextStep(AbstractStepModel.java:125) at com.mathworks.toolbox.coder.wfa.core.AbstractStepModel.goToNextStep(AbstractStepModel.java:86) at com.mathworks.toolbox.coder.nwfa.CoderNavController$2.actionPerformed(CoderNavController.java:64) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(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.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.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) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mathworks.toolbox.coder.wfa.CoderStepViewFactory.instantiateUI(CoderStepViewFactory.java:74) ... 43 more Caused by: java.lang.NullPointerException at com.mathworks.toolbox.coder.fixedpoint.AdvancedSettingsTable.updateFilter(AdvancedSettingsTable.java:469) at com.mathworks.toolbox.coder.fixedpoint.AdvancedSettingsTable.access$100(AdvancedSettingsTable.java:64) at com.mathworks.toolbox.coder.fixedpoint.AdvancedSettingsTable$1.stateChanged(AdvancedSettingsTable.java:141) at com.mathworks.util.MulticastChangeListener.stateChanged(MulticastChangeListener.java:25) at com.mathworks.toolbox.coder.plugin.inputtypes.PropertyBinder.setData(PropertyBinder.java:47) at com.mathworks.toolbox.coder.plugin.Utilities.stringToFimath(Utilities.java:773) at com.mathworks.toolbox.coder.fixedpoint.AdvancedSettingsTable.deserializeFimath(AdvancedSettingsTable.java:524) at com.mathworks.toolbox.coder.fixedpoint.AdvancedSettingsTable.<init>(AdvancedSettingsTable.java:118) at com.mathworks.toolbox.coder.fixedpoint.AdvancedSettingsTable.<init>(AdvancedSettingsTable.java:99) at com.mathworks.toolbox.coder.wfa.fixedpoint.FixedPointView.<init>(FixedPointView.java:249) ... 48 more

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!