Matlab directory; keeping addpath compatible between my linux and windows
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Moritz
le 19 Fév 2014
Réponse apportée : Jos (10584)
le 19 Fév 2014
Hi Folks,
i am storing my tools from Filexchange in z.B /home/moritz/matlab/tools and D:\moritz\matlab\tools
does anyone know how to write the addpath line in functions or skripts so that i would not have to change this line everytime i skip to my laptop ?
A try catch phrase would probably work.
Best regards
Moritz
0 commentaires
Réponse acceptée
Jos (10584)
le 19 Fév 2014
if ispc
disp('I am sorry for you ;-)') ;
addpath ('d:\moritz\matlab\tools')
else
addpath('/home/ … ')
end
Also see ISUNIX, ISMAC. In addition, the function FULLFILE might also be interesting to you.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Search Path dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!