Matlab can't recognize my functions

  • Context: MATLAB 
  • Thread starter Thread starter dmatador
  • Start date Start date
  • Tags Tags
    Functions Matlab
Click For Summary
SUMMARY

The discussion centers on a user experiencing issues with Matlab not recognizing functions defined in separate files. The user is attempting to run a program from a flash drive but encounters an "undefined input argument" error. The problem arises after receiving the code via email, which worked for the original author. The consensus is that sharing the relevant code and error messages is essential for troubleshooting.

PREREQUISITES
  • Understanding of Matlab function definitions and file structure
  • Familiarity with setting the Matlab current directory
  • Basic knowledge of debugging in Matlab
  • Experience with file transfer methods, particularly via email
NEXT STEPS
  • Research how to properly define and call functions in Matlab
  • Learn about Matlab's current directory management and path settings
  • Explore debugging techniques in Matlab to identify undefined variables
  • Investigate best practices for sharing Matlab code files
USEFUL FOR

New Matlab users, programmers transitioning to Matlab, and anyone troubleshooting function recognition issues in Matlab.

dmatador
Messages
120
Reaction score
1
I am new to Matlab and have been having problems running a program that has functions defined in separate files and calls them. I am putting everything onto my flash drive and setting the directory to that, but it gives me an error saying that the input argument in the first function called is undefined. It worked for my friend who wrote the program but not for me after receiving it via email. Any suggestions?
 
Physics news on Phys.org
Post the relevant code. Without code and error messages, nobody can help you.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
10K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
9K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K