f



issue in runiing matlab commands in zsh shell

Hi,

While running matlab 2008 in zsh shell, I found that some commands (ls, copyfile) are reporting following type of errors.  

Error using ==> ls at 36 which corresponds to 'MATLAB:ls:OSError' which is equivalent to matlab failing to execute unix command.

Similar error is produced whenever matlab command (ex. copyfile) invokes unix built in command (lex. cp -rf). 

I do not see this issue with matlab 2006 and matlab 2011. Please let me know why does it happen for matlab 2008.

Regards

Supriyo
0
supriyomj (4)
6/11/2012 1:02:06 PM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

4 Replies
772 Views

Similar Articles

[PageSpeed] 3


"Supriyo " <supriyomj@gmail.com> wrote in message 
news:jr4q8e$hc9$1@newscl01ah.mathworks.com...
> Hi,
>
> While running matlab 2008 in zsh shell, I found that some commands (ls, 
> copyfile) are reporting following type of errors.
> Error using ==> ls at 36 which corresponds to 'MATLAB:ls:OSError' which is 
> equivalent to matlab failing to execute unix command.
>
> Similar error is produced whenever matlab command (ex. copyfile) invokes 
> unix built in command (lex. cp -rf).
> I do not see this issue with matlab 2006 and matlab 2011. Please let me 
> know why does it happen for matlab 2008.

What does the second output argument of this call say?

[status, result] = system('ls')

-- 
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on 
http://www.mathworks.com 

0
slord (13689)
6/11/2012 1:34:57 PM
"Steven_Lord" <slord@mathworks.com> wrote in message <jr4s61$q8d$1@newscl01ah.mathworks.com>...
> 
> 
> "Supriyo " <supriyomj@gmail.com> wrote in message 
> news:jr4q8e$hc9$1@newscl01ah.mathworks.com...
> > Hi,
> >
> > While running matlab 2008 in zsh shell, I found that some commands (ls, 
> > copyfile) are reporting following type of errors.
> > Error using ==> ls at 36 which corresponds to 'MATLAB:ls:OSError' which is 
> > equivalent to matlab failing to execute unix command.
> >
> > Similar error is produced whenever matlab command (ex. copyfile) invokes 
> > unix built in command (lex. cp -rf).
> > I do not see this issue with matlab 2006 and matlab 2011. Please let me 
> > know why does it happen for matlab 2008.
> 
> What does the second output argument of this call say?
> 
> [status, result] = system('ls')
> 
> -- 
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on 
> http://www.mathworks.com 


Hi,

Here is the output.


[status,result]=system('ls')

status =

   127


result =

     ''


Regards

Supriyo
0
supriyomj (4)
6/12/2012 7:19:07 AM

"Supriyo " <supriyomj@gmail.com> wrote in message 
news:jr6qhb$j1q$1@newscl01ah.mathworks.com...
> "Steven_Lord" <slord@mathworks.com> wrote in message 
> <jr4s61$q8d$1@newscl01ah.mathworks.com>...
>>
>>
>> "Supriyo " <supriyomj@gmail.com> wrote in message 
>> news:jr4q8e$hc9$1@newscl01ah.mathworks.com...
>> > Hi,
>> >
>> > While running matlab 2008 in zsh shell, I found that some commands (ls, 
>> > copyfile) are reporting following type of errors.
>> > Error using ==> ls at 36 which corresponds to 'MATLAB:ls:OSError' which 
>> > is equivalent to matlab failing to execute unix command.
>> >
>> > Similar error is produced whenever matlab command (ex. copyfile) 
>> > invokes unix built in command (lex. cp -rf).
>> > I do not see this issue with matlab 2006 and matlab 2011. Please let me 
>> > know why does it happen for matlab 2008.
>>
>> What does the second output argument of this call say?
>>
>> [status, result] = system('ls')
>>
>> -- 
>> Steve Lord
>> slord@mathworks.com
>> To contact Technical Support use the Contact Us link on 
>> http://www.mathworks.com
>
>
> Hi,
>
> Here is the output.
>
>
> [status,result]=system('ls')
>
> status =
>
>   127

Code 127? According to this, that corresponds to "Command not found."

http://www.thegeekstuff.com/2010/03/bash-shell-exit-status/

That would suggest to me that your PATH environment variable is getting 
truncated somehow before MATLAB starts. In a terminal window, display the 
contents of that variable (using "env | grep PATH") and the path to the LS 
binary with "where ls". Now inside MATLAB, execute this command:

getenv('PATH')

If the output of GETENV inside MATLAB is not the same as the contents 
displayed using ENV, then something's adding/removing a directory from the 
path, and I'm guessing that the directory containing the LS binary is one of 
the directories removed. I'm 99.9% sure MATLAB doesn't remove directories 
from the path as part of its normal operation, so you'll probably want to 
work with your IT staff to track down what is.

-- 
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on 
http://www.mathworks.com 

0
slord (13689)
6/12/2012 1:28:43 PM
"Steven_Lord" <slord@mathworks.com> wrote in message <jr4s61$q8d$1@newscl01ah.mathworks.com>...
> 
> 
> "Supriyo " <supriyomj@gmail.com> wrote in message 
> news:jr4q8e$hc9$1@newscl01ah.mathworks.com...
> > Hi,
> >
> > While running matlab 2008 in zsh shell, I found that some commands (ls, 
> > copyfile) are reporting following type of errors.
> > Error using ==> ls at 36 which corresponds to 'MATLAB:ls:OSError' which is 
> > equivalent to matlab failing to execute unix command.
> >
> > Similar error is produced whenever matlab command (ex. copyfile) invokes 
> > unix built in command (lex. cp -rf).
> > I do not see this issue with matlab 2006 and matlab 2011. Please let me 
> > know why does it happen for matlab 2008.
> 
> What does the second output argument of this call say?
> 
> [status, result] = system('ls')
> 
> -- 
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on 
> http://www.mathworks.com 

Hi,

Thank you for your suggestion. It was helpful. What I found out is the path to the unix binaries (/bin) was available in matlab but strangely was unable to execute them unless i sat in that path, thus resulting in code 127 or command not found. While looking through .zshrc file, I found SHELL variable was defined as zsh. When I changed it to /bin/zsh, matlab started executing unix command without any issue. 

Regards

Supriyo 
0
supriyomj (4)
6/13/2012 5:46:07 PM
Reply:

Similar Artilces:

How does matlab work in this issue ? a matlab principle question
Hello everyone I have an ODE solver computing the temperature every month during a year this script will do the job for j=1:12 [t,T]= ode45(@monthly_solver,tspan,Tic,[],monthly_heat(j),h2(j),); end where Tic is the intial temperature and J loops represents the months Now the question is about matlab principle and how does it work with the initial condition? i mean as the last temperature of the 1st month is the begining temperture of the 2nd month and the last temp. of the 2nd month is the begining temp. of the 3rd month and so on. Do i need to write a command to do ...

Matlab command to convert Matlab script to C
I know that this has probably been asked before but I desperately need to do this. I have simple scripts in Matlab and I would like to see what they look like in C language. Can anyone help me with this? I'm not a great C programer so this would help me immensly if I could see various examples of things that I have written in Matlab in C Thank you. Hi finiteguy, check the MATLAB help for the MATLAB Compiler, if you have. Regards, Stefan Hi Stefan, I tried that and got no help. Nothing about Matlab compiler. I kew that years ago there was a simple command but I lost it. On Mon, 30...

matlab compiler, matlab path, expanded ctf issues
Dear All: If anyone has used the matlab compiler I would appreciate some help. I make a very simple test case test.m: function test fprintf('Hello world\n'); test2 And test2.m: function test2 fprintf('2Hello world\n'); I do mcc -m test Run it runs beautifully. Now, same thing, move test2.m somewhere on matlab path. test still runs in matlab. I do mcc -m test, and get error: misha@misha-d630:~/Montague Lab/code$ ./test This MATLAB file does not have proper version information and may be corrupt. The file '/home/misha/Montague/matlab/test2.m' is not in the application's expanded CTF archive at '/home/misha/.mcr_cache_v78/test_76D3A49E2BAD9671283F48CFD4C9C63F'. This is typically caused by calls to ADDPATH in your startup.m or matlabrc.m files. Please see the compiler documentation and use the ISDEPLOYED function to ensure ADDPATH commands are not executed by deployed applications. ??? An error occurred while trying to determine whether "test2" is a function name. Please help. Thank you Misha CyberFrog <domlee55@hotmail.com> wrote in message <299841556.55624.1263297568019.JavaMail.root@gallium.mathforum.org>... > Hi Misha, > I have just come across this same problem, did you ever figure this out in the end? > > Thanks Sorry, no luck :( Please let me know if you figure out! Misha Hi Misha, I have just come across this same problem, did you ever figure this out in the end? Than...

Desktop shortcut to matlab, passing a matlab command together with it?
Hi, I have written a gui using matlab. What I would like is a desktop-shortcut to open matlab and start the gui/m-file automatically. Is it possible to startup this gui from e.g. a dos-prompt-shortcut AND to pass a matlab command along with it? Thanks for any info. joris wrote: > Hi, > > I have written a gui using matlab. What I would like is a > desktop-shortcut to open matlab and start the gui/m-file > automatically. > > Is it possible to startup this gui from e.g. a dos-prompt-shortcut AND > to pass a matlab command along with it? > > Thanks for...

shell commands within matlab
Hello, I'm having trouble when trying to run shell commands within matlab, such as !latex ..., or unix(...) , etc. Apparently, I should change the default "sh" command by "ssh" since I'm running Matlab in Mac OS Tiger, but I don't know where to specifiy the shell path. I've found a .matlab7rc.sh file, but I hesitate to modify it and don't really know how anyway... any help greatly appreciated! any Mac users forum where I could get some advice? ...

Issuing AutoCAD commands through MatLab
Hello, My problem is the following: I have a set of cartesian coordinates data in matlab connected with lines. What I need to do is plot those lines in autocad. One simple way to do this would be to export the matlab data to a .txt file and use a simple routine in Autolisp. However I am looking for a different solution.. Is there any way to manipulate autocad through matlab? For example..issuing the command plot_line([x1 y1],[x2 y2]) in matlab would result in a line plotted between the points with those coordinates in autocad. Where could I start looking...? "Omni Domni" <elo...

Running single matlab commands from the shell
Hi Everyone I've written a matlab script to pick up the results of another program's analysis and perform some calculations with it, in a self contained fashion (no user input is needed, and it saves ascii files). Is there a way of running this command in a standard shell (ie something like "matlab -runonce program"), rather than starting up matlab, then running it, and then shutting down matlab? Thanks Ben I think: matlab -nosplash < myscript.m > logfile & still works, but it has to be a script, not a program. Benjamin Hall wrote: > Hi Everyone > > ...

issues involved in moving from MATLAB 5.3 (Release 11.0) to MATLAB 6.0.
Hi, I,ve found the reason for a problem I had (and posted last week), passing from M 5.3 to 6. In "Programming and Data Types Issues" I found that: "Attempting to assign a structure to a field of another structure now results in an error if both of the following conditions are true: The field being assigned to has been initialized to an empty matrix. The field being assigned to is referenced in the assignment using an array index. For example, mystruct.emptyfield = []; mystruct.emptyfield(1) = struct('f1', 25); ??? Conversion to double from struct is not possible. Th...

parallel matlab
Hi all, I'm going to work on a project involving a parallel version of MATLAB - I'm aware of various efforts like MATLAB-*P and so on Right now I need to read up on some material regarding MATLAB internals eg: How are the ATLAS(or is it BLAS) routines called in MATLAB? How does MATLAB's C code store information in memory, cache'ing etc? How is one to get at those? Do you know of any suitable reference(s)/resource(s)? Thank you very much, Aravind ...

a matlab command
IS there any command "solution" in matlab? I have found in the internet a command like, c=solution(A,w) but when I try this its not working. so I got confused. amira sohel wrote: > > > IS there any command "solution" in matlab? > > I have found in the internet a command like, > > c=solution(A,w) > > but when I try this its not working. > > so I got confused. There is nothing such as 'solution' command. However (which I guess you saw in internet), you can create your own function fime and save it as solution.m. That should be th...

Matlab plots outside Matlab
I'm making an end-user application where I would like to use Matlab functionality both for calculation and plotting. Matlabs GUI builder guide does not satisfy my needs (no support for f.ex. internal frames and other nescessities), so I'm planning to compile my Matlab code and use other API (Java, QT or something) for GUI. My problem is then, that I loose access to the neat plotting commands availible under matlab GUI... Is there a way of integrating Matlabs plot functionality into another GUI system? - has it been done? - I appreciate any response! - P�l Berge ...

AT COMMAND in MATLAB
I have surfed most MATLAB website as I know, but I still can't find any information about "How to use AT COMMAND in MATLAB". Does everone know or guide me to find some information about AT COMMAND and MATLAB. I would like to understand how to use AT COMMAND in MATLAB in my job. Thanks a lot~~ chikang@ms1.url.com.tw (Zach) writes: >I have surfed most MATLAB website as I know, but I still can't find >any information about "How to use AT COMMAND in MATLAB". What do you mean? Matlab doesn't have an at command. Do you want to know how to use the @ operator in matlab? If so, do help function_handle from inside matlab. If you want to use Unix's "at" command, then do man at from the unix command line. "Zach" <chikang@ms1.url.com.tw> wrote in message news:ca17yxhxdn97@legacy... > I have surfed most MATLAB website as I know, but I still can't find > any information about "How to use AT COMMAND in MATLAB". > Does everone know or guide me to find some information about AT > COMMAND and MATLAB. > I would like to understand how to use AT COMMAND in MATLAB in my job. > Thanks a lot~~ > There is no AT command in MATLAB -- you may be referring to something that was created by someone in your company. If this is the case you would need to contact that original author for information, or look at the code. If you want to know more about using the @ operator to create functio...

Calling Compiled MATLAB from MATLAB
Hello everyone, How do I compile MATLAB M files into a form that can then be called from within the MATLAB interpreter? A roundabout way would seem to be to (somehow) Turn the matlab code into C (I think mcc does this), then compile this C code into MEX format and call that. Is there an easier way? I have the MATLAB compiler, so I just need to know what to do with it to get this to work. Thanks in advance, Sina sina.tootoonian wrote: > > > Hello everyone, > > How do I compile MATLAB M files into a form that can then be called > from within the MATLAB interpreter? A roundabout way would seem to > be > to (somehow) Turn the matlab code into C (I think mcc does this), > then > compile this C code into MEX format and call that. Is there an > easier > way? I have the MATLAB compiler, so I just need to know what to do > with > it to get this to work. > > Thanks in advance, > > Sina > > HELP MEX > HELP MEX Or, better, HELP MCC help pcode pseudo code is useful to obfuscate code - protect algorithms, yet still run at full speed and be distributable to other matlab users sina.tootoonian wrote: > > > Hello everyone, > > How do I compile MATLAB M files into a form that can then be called > from within the MATLAB interpreter? A roundabout way would seem to > be > to (somehow) Turn the matlab code into C (I think mcc does this), > then > compile this C code into MEX format and call that...

Pass a filename into command line shell scritp using matlab script
Hi all, I am trying to change the encoding of text files from UCS-2LE into UTF-8 recursively using shell command iconv -f UCS-2LE -t UTF-8 input.txt > ouput.txt and then extract the text inside the texfile using matlab. I want to use just matlab rather than using shell script and then using matlab separately. I have text files inside a subdirectory. I passed the list of text file in a variable like filename text1.txt text2.txt text3.txt So I want to loop around all the text files and change the encoding. Something like for i = 1:size(filename,1) x=p(i,:); system('ic...

Matlab
Hello , I'm a new user in Matlab. So should you advise matlab notes , documentation please ? <azatserver113@gmail.com> wrote in message news:7b4e75e2-40c6-43bb-acc6-2553123ba649@googlegroups.com... > Hello , > > I'm a new user in Matlab. So should you advise matlab notes , > documentation please ? > At the MATLAB command prompt type this command: doc This will show the documentation included as part of your installation. I recommend reading through the Getting Started section of the MATLAB documentation first, and executing the examp...

matlab
any one please can help me sploving the following question 1________Given the causal system y[n] =3D 0.9y[n-1] + x[n], find H(z) and sketch the pole-zero plot. See the functions roots.m and zplane.m. 2___ Plot the magnitude and phase of H(z) on the frequency axis from 0 =E2=80=93 =EF=81=B0, or normalized frequency 0 - 1, and label the graphs. S= ee the freqz.m command. hani_al_yazidi@hotmail.com wrote: > any one please can help me sploving the following question > > > 1________Given the causal system > > y[n] = 0.9y[n-1] + x[n], > > find H(z) and sketch the pole-zero plot. See the functions roots.m and > zplane.m. > > 2___ Plot the magnitude and phase of H(z) on the frequency axis from 0 > – , or normalized frequency 0 - 1, and label the graphs. See the > freqz.m command. It looks like homework. State what you tried and what error messages you got and someone who knows Matlab will probably help. We try not to do homework here, but (like gods) we do help those who help themselves. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯&...

can Matlab support 32-bit matlab version scripts on 64-bit version of matlab
can Matlab support 32-bit matlab version scripts on 64-bit version of matlab in windows platform?.if yes , how is the performance better ? please do answer this question thank u "Gangamma " <gangvsng@gmail.com> wrote in message <hvmr7h$sn0$1@fred.mathworks.com>... > can Matlab support 32-bit matlab version scripts on 64-bit version of matlab in windows platform?.if yes , how is the performance better ? Yes, Matlab program written in 32/64 bits are compatible accepted MEX file. 64-bit version can handle larger array but does *NOT* improve speed. Br...

can Matlab support 32-bit matlab version scripts on 64-bit version of matlab #2
can Matlab support 32-bit matlab version scripts on 64-bit version of matlab in windows platform?.if yes , how is the performance better ? please do answer this question thank u ...

Matlab compiler for Matlab 5.2
I'm looking for matlab compiler for matlab 5.2 for Mac computers. I wasn't able to find anywhere because the Mathworks doesn't produce it. Do you know were I may find it? Thanks ...

MATLAB Daemon
Hi! Is it posible to make a Daemon in MATLAB so that i can access a shared memory between MATLAB and .NET? I ask this because every method i've tryied to call MATLAB functions from .NET are really slow, mostly the call process (because i call the function about 300.000-1.000.000 times in a small time lapse. I thought that using a Daemon using shared memory between my .NET app and MATLAB would make that performance bottleneck almost dissapear. Any other ideas are really appreciated. By the way, is it posible to open a socket in MATLAB? That would be another possible solution, less performa...

Matlab Engine with Matlab Runtime Component ?
Hi, I have a c++ application which uses Matlab engine to save data for further use with Matlab. I need to distribute the application to users that do not have Matlab. Is there a way tp use Matlab Engine with Matlab Runtime Component ? How should I change the compilation to do it ? Thanks, Ofra ...

MATLAB 6 to MATLAB 7 changes
I am looking for information here on the MathWorks website about the changes between MATLAB 6 and MATLAB 7. Specifically, I am looking for information about changes in the handling of .mat files. For example if I have a mat-file: example.mat located in the MATLAB current directory. In MATLAB 7 I can load this data-file into the MATLAB workspace with: >> load example And it loads fine. If I type the above load command in MATLAB 6 I get and error. Is there anything that provides the technical information for this? Thanks Dave Dave wrote: > I am looking for information here on t...

Matlab R2006b compatability with Matlab R14?
I am trying to execute some code (a mixture of C++ and Matlab) that was delivered to me. The Matlab code was originally developed under Matlab R14. I have Matlab R2006b installed on my system. When I attempt to execute the program, I get the following message: I18N Runtime warning: Missing ICU data file detected while processing $(MATLAB)/bin/$(ARCH). Hint: Check for a misconfigured environment or installation. When I look in the referenced directory, there does appear to be an ICU related .dat file. Any ideas as to what could be causing this runtime warning? Thanks. ...

Matlab comiler and simple matlab function
I am trying to create an exe from a matlab function which doubles the number you give it. matlab function: test.m function [output] = test (number) %return double the input number output = 2*number; disp(output); run matlab compiler at command line with: mcc -mv test.m with the resulting exe: test.exe However when I run it at DOS prompt: test 1 I am returned a value of 98. I thought that maybe this was some octal description of the output, but 98 oct is not 2 decimal. Some other results it returned: C:\Documents and Settings\alex\Desktop\lighttrans\Frank Work \test...

Web resources about - issue in runiing matlab commands in zsh shell - comp.soft-sys.matlab

Command - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

IS second in command likely killed
IS second in command likely killed

US forces kill ISIL second in command in Syria
US Defense Secretary Ash Carter confirms that US operations likely killed several high-ranking officials of Islamic State.

US forces kill ISIL second in command in Syria
US Defense Secretary Ash Carter confirms that US operations likely killed several high-ranking officials of Islamic State.

Islamic State group setbacks as second-in-command killed, Syrian military recaptures Palmyra's citadel ...
IS suffers setbacks in Syria as the Pentagon says their second-in-command is dead and troops recapture Palmyra's citadel.

Seinfeld's Porsches and VWs command $22 million at auction
Filed under: Celebrities , Porsche , Volkswagen , Auctions Some of Jerry Seinfeld's Porsches sold at Amelia Island last weekend for well below ...

How to free up RAM from the command line
... is using more RAM than it should, then there is one small and very simple tool which might be able to help. Empty Standby List is a free command ...

In 2016 Which Political Party Commands The Loyalty Of Working Class Voters?
Nick Confessore's early Monday NYTimes feature, How the GOP Elite Lost Its Voters To Donald Trump , was destined to be the most read political ...

Obama to nominate 1st woman to head U.S. combatant command
Air Force Gen. Lori Robinson would be the first woman to head a major U.S.

ISIS' second-in-command killed: Officials
ISIS' second in command, Haji Imam, was killed during a raid in Syria this month, U.S. defense officials announced Friday.

Resources last updated: 3/30/2016 2:37:30 AM