Run the second programme in the current execution

7 visualizzazioni (ultimi 30 giorni)
I have a code (.m) file stored on my PC. Now I want to run this file in between the execution of my current programme, like:
for i=1:3
for j=1:2
%run the particular (.m) file saved on PC
Please help.

Risposta accettata

per isakson
per isakson il 1 Lug 2012
Modificato: per isakson il 1 Lug 2012
Assume the name of your m-file is my_code.m. Try
for i=1:3
for j=1:2
% run the particular (.m) file saved on PC
Your code is that a script or a function? Do you need to pass data to my_code?
  1 Commento
manish sharma
manish sharma il 1 Lug 2012
That was simpler than I expected :)
Thanks a lot Isakson!

Accedi per commentare.

Più risposte (0)


Scopri di più su Workspace Variables and MAT-Files in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by