Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 554455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:42:40+00:00 2026-05-13T11:42:40+00:00

I have written a code in matlab which modulate and demodulate some signals. I

  • 0

I have written a code in matlab which modulate and demodulate some signals. I deploy them using deploytool and the .jar works in one application without GUI but gives me the Undefined variable "modem" or class "modem.pskmod". in an application with GUI.

Basically, what I want to know what will cause this error to occur as I have look around, I don’t find much documentation on this error.

As I don’t understand why it work in one application but fails in another when the code I use is almost similar when calling the method.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:42:41+00:00Added an answer on May 13, 2026 at 11:42 am

    Ok, after much testing and comparing the difference between an application WITHOUT a GUI and an application WITH a GUI. I found a solution to my problem.

    As an application without a GUI run init the method from the start of the application (there is only one thread)

    import matlabFunction.*;
    public static void main(String[] args) {
    matlabFunction test = new matlabFunction();
    test.runFunction(1, lstABC.toArray());
    }

    But in my code with GUI I run the init method from within the JFrame (main() contain my init code) which is inside the EDT

    public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                try {
    
                    new main();
                } catch (Exception p) {
                }
            }
        });
    }  
    

    The error occur with the above way to init the matlab method. But if I change way of calling the init method as below, the error is solve.

    public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                try {
                    matlabFunction test = new matlabFunction();
                    new main(test);
                } catch (Exception p) {
                }
            }
        });
    } 
    

    So, I believe the reason for my problem is not calling the init method from the “first” thread that starts the application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written some piece of code for my program in Matlab 7.10.0 which
I have written some code that loads an XML document using an XmlDocument object
I have written some matlab code for image analysis that searches for clusters in
I'm trying to rewrite code I've written in matlab in C++ instead. I have
I have written this code in JavaScript and works perfectly fine when I include
I have written some code for displaying a drop down list, but the code
I have written code such as the following, which by assumption shouldn't compile. I'm
I have written code for an application. It has some motion events. The motion
I have this line of code in MATLAB, written by someone else: c=a.'/b I
I have written code which saves a user's answers as well as a recorded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.