473,399 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

PHP problem with nume1(files) in matlab

2
Hello, i try to execute a .m file using PHP

i wanted to count the number of jpg files in the directory but PHP was unable to detect it.

the PHP script:

<?php
execute('start /b matlab -nosplash -nodesktop -r readfilename');
?>


where readfilename is the name of the m file (readfilename.m)

the m file:

files=dir('*.jpg');
for i=1:numel(files)
a = files(i).name;
dlmwrite('names.txt', a, 'delimiter','','newline', 'pc', '-append');
end


when the matlab command window pops out, i type in numel(files) and it returns a value 0 instead of the number of image files in the directory.

how do i go about solving this problem?

please advise..

thanks.
Mar 9 '07 #1
0 1974

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bad_Kid | last post by:
Need to make a program that will automaticly deal with specified system files & folders - according to a date it has to make folder named "" and to cut files (or copy - paste - delete) from 4 other...
4
by: Toni | last post by:
Hi, I'm writing a C program that should do something like transactions on files. I have several reader processes and one writer, and I have to make sure that the writer either writes everything...
6
by: asn | last post by:
Example : If i store details of Employee no and name in a text file and the employee salaries in another. Is it possible to read data from these two files simultaneously using file stream...
4
by: Jerry | last post by:
I'm having just a bit of trouble wrapping my brain around the task of working with folders that are above the site's root folder. I let users upload photos (.jpg/.gif files) which can...
4
by: BeeF | last post by:
Hi Guys, Help out a new user here I want to compare a directory on my drive with files on a web page. So my problem realy has two parts first the comparison. I'm thinking of loading the files...
2
by: Binod Pant | last post by:
Does any one know of a way to call MATLAB from PHP/Perl? I found the Perl module Math:MATLAB , but it seems not to work on Windows, and it's not easy to install and use. This would enable one to...
0
by: rukhiya | last post by:
How to Use the SHGetFileInfo Function to Get the Icons That Are Associated with Files in Visual C.NET
7
by: halex2000 | last post by:
Hi all, I'm new with Python, and I thought to use it to automatically rename some files in a directory, but I don't know where should I search the functions: to get all the files of a directory, to...
0
by: shyam | last post by:
Hi, I am trying to use ode45 in c++ using the matlab library functions. I am trying to use a mass matrix using the odeset property. First i tried the code without setting a mass matrix. Here is a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.