i have created a .pl file includes the code that begins with: " #!/usr/bin/perl " and one other .m file (the matlab function calling the wrapper) but when i run the .m file it appears this message :
Input argument "alfa" is undefined.
Error in ==> codexfoil at 12
alfa = sprintf('%.5f', alfa);
is't it already defined ? what should i do ? i suspect that this problem will arise for the other variables too (mach etc)...please reply
what is more, xfoilP4.exe should be in the same folder with the previous files?please answer both...
I'm facing exactly the same problem with Nikolhs. Also, now i have to xfoilwrapper.pl and get_coeff.m, but when i tried running it, i got this msg:
System error: Can't locate warnings.pm in @INC in Matlab.
I have no knowledge in perl at all...Would you plzz tell us exactly what to do?
Thanks sooooo much in advance
The M-file is a function, and notice that its first argument is alfa. You need to supply the input arguments to the function.
Read the first comments in get_coeffs.m to understand the exact syntax needed.
Last edited by azredwing; June 8th, 2010 at 08:48 PM.
What version of MATLAB are you using? I also suppose that you're running Windows, since MATLAB for Linux uses the Perl implementation that comes stock with the OS. In any case, try putting a # in front of the line:
This will prevent Perl from loading the apparently non-existent "warnings" module and bombing out.Code:use warnings;
I just tried running a rudimentary Perl script using MATLAB for Windows, though, and it worked fine.
If there's enough interest, I could rewrite these scripts to be more general-purpose and have standard releases or something; I suppose aerospace engineers don't typically have the programming skills required to do this type of stuff. Let me know if you'd like to see this.
Thank u very much for your help...
I've tried putting # in front of "use warnings", and that worked ok, but then these lines occured:
??? Error using ==> perl
System error: Too many arguments for open at xfoilwrapper.pl line 34, near "or"
Too many arguments for open at xfoilwrapper.pl line 62, near "or"
Too many arguments for open at xfoilwrapper.pl line 108, near "or"
Too many arguments for open at xfoilwrapper.pl line 133, near "or"
Execution of xfoilwrapper.pl aborted due to compilation errors.
Command executed: perl xfoilwrapper.pl 10.00000 3000000 1.00000 0012
I have no idea what happened here....
Your help would be much appreciated.. thank u again!
(P.S. About the general purpose code that you said you would write?, would 2 interests be enough..me and nikolhs? )
I am working on it The lab that I work in is also pretty interested in this... I can't say it'll be out any time soon, but I am definitely going to do it.(P.S. About the general purpose code that you said you would write?, would 2 interests be enough..me and nikolhs? )
I"m running Matlab 7.0 on window xp. and since i don't know Perl at all,
I also have ActivePerl 5.9.9 build 519 installed, but when i copied your
Perl code, i did it in notepad and save it as .pl
Do I need to update my matlab or anything?
Thanks in advance.