Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regarding value problem.

Status
Not open for further replies.

vinsen

Mechanical
Feb 15, 2007
19
0
0
hi.

thanks for your replies,

i have a command down here where value of e is 200 but when i run this, it is not taking e's value and it isnt working properly can someone guide me why,

dos([['C:\Project\splitCSV.exe C:\Project\' fileName ' e ']])

waiting for your reply,

vinod.b


 
Replies continue below

Recommended for you

You probably want something more like this:

dos(['C:\Project\splitCSV.exe C:\Project\' fileName num2str(e)])

Note that I removed your redundant brackets too.
 
hi,

i forgot to tell you that fileName is a string where the actual file name is stored, thats why i have the quotes.

but it is not working it is not splitting the file when i give directly a value instead of e, then i get it done perfectly,

again help needed,

thanks,

vinod.b
 
What command do you want executed (i.e. what exact string do you want to pass to the dos() function)? All you say is that it doesn't work. I realised fileName was a string and simply assumed you wanted the value of e appended. I'll try one more guess - maybe you want e as an argument?? If that's the case:

dos(['C:\Project\splitCSV.exe C:\Project\' fileName ' ' num2str(e)])

 
hi,

i tried this one too, i will explain you clearly, i get the filename lets say vinod.csv and store it in 'fileName'as string and then i ask the user to give a value for e and lets say 200, and i use this value in the split.exe to split a file of 600 mb size to 200 each using the dos function in matlab,as the exe file runs only in dos,i use the dos function from matlab.

i hope you got a clear picture now,

if i use the following code,

dos(['C:\Project\splitCSV.exe C:\Project\' fileName ' 200 '])

it is running fine and it is splitting the file, but when i give e = 200 and put e instead of 200, i have the problem

can you explain me anyother way,

thanks,

vinod.b
 
>> fileName='myfile'; e=200;
>> ['C:\Project\splitCSV.exe C:\Project\' fileName ' 200 ']

ans =

C:\Project\splitCSV.exe C:\Project\myfile 200

>> (['C:\Project\splitCSV.exe C:\Project\' fileName ' ' num2str(e)])

ans =

C:\Project\splitCSV.exe C:\Project\myfile 200


They look the same to me.
 
Please refrain from starting new threads on an existing problem. It's out of context and confusing to others that haven't beend paying attention to your threads.

TTFN

FAQ731-376


 
hi friends,

thank you for the help it works fine,

and sorry for the mistake of posting it twice and it will not happen again,

thank you once again for your suggestions,

with wishes,

vinod.b
 
Status
Not open for further replies.
Back
Top