32
of 76
TEP , The Engineering Projects , Image

syedzainnasir

TEP , The Engineering Projects , Rating 7.5 7.5 / 10
TEP , The Engineering Projects , Icon Level: Moderator
TEP , The Engineering Projects , Icon Joined: 20 Mar 2022
TEP , The Engineering Projects , Icon Last Active: 2:21 PM
TEP , The Engineering Projects , Icon Location: TEP , The Engineering Projects , Flag
TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon
How to call a function which is in another program MATLAB
TEP , The Engineering Projects , Calender Question: 06-Mar-2017
TEP , The Engineering Projects , Category In: MATLAB Projects
I write this in my main program [code] [C,rows,cols,entries] = Matrix('C.txt')[/code] Matrix fuction is in another program Matrix.m and I want to call it.

I get this error :
[code]Undefined function or variable 'Matrix'. Error in (line 19) [C,rows,cols,entries] = Matrix'C.txt')[/code] Can you please tell me how to fix it ?
TEP , The Engineering Projects , Icon Answer: 2 TEP , The Engineering Projects , Icon Views: 150 TEP , The Engineering Projects , Icon Followers: 85
Small Bio
TEP , The Engineering Projects , Image

adiono

TEP , The Engineering Projects , Rating 7.5 7.5 / 10
TEP , The Engineering Projects , Icon Level: Moderator
TEP , The Engineering Projects , Icon Joined: 20 Mar 2022
TEP , The Engineering Projects , Icon Last Active: 2:21 PM
TEP , The Engineering Projects , Icon Location: TEP , The Engineering Projects , Flag
TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon

RE:

How to call a function which is in another program MATLAB
TEP , The Engineering Projects , Calender Comment: 09-Mar-2017
TEP , The Engineering Projects , Category In: MATLAB Projects
You should place your Main file and the function file in the same folder otherwise you can't call function files in the Main File.

Moreover, another thing I just checked is that you are missing the bracket sign in below code: [code][C,rows,cols,entries] = Matrix'C.txt')[/code] So, you should add this small bracket too.
TEP , The Engineering Projects , Tick Correct Answer
Comment Bio
TEP , The Engineering Projects , Image

adiono

TEP , The Engineering Projects , Rating 7.5 7.5 / 10
TEP , The Engineering Projects , Icon Level: Moderator
TEP , The Engineering Projects , Icon Joined: 20 Mar 2022
TEP , The Engineering Projects , Icon Last Active: 2:21 PM
TEP , The Engineering Projects , Icon Location: TEP , The Engineering Projects , Flag
TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon

RE:

How to call a function which is in another program MATLAB
TEP , The Engineering Projects , Calender Comment: 10-Mar-2017
TEP , The Engineering Projects , Category In: MATLAB Projects
[quote=theenggprojects post_id=552 time=1489047701 user_id=2] You should place your Main file and the function file in the same folder otherwise you can't call function files in the Main File.

Moreover, another thing I just checked is that you are missing the bracket sign in below code: [code][C,rows,cols,entries] = Matrix'C.txt')[/code] So, you should add this small bracket too. [/quote]
thanks for the code dear
TEP , The Engineering Projects , Tick Correct Answer
Comment Bio
TEP , The Engineering Projects , Tags
PLC
Robot
STM32
Arduino
AI
ESP32
Ladder Logic
PLC Projects
Programming
Communicates STM32
PLC Projects
Communicates PLC
Font Style
Alignment
Indenting and Lists
Insert Media
Insert Items

Want to leave an answer!

Word Count :0 Draft Saved at 12:42 am.