How does "Input" work?

398 views
Skip to first unread message

keyopen

unread,
May 21, 2010, 7:02:35 PM5/21/10
to freemat
I'm using a MacBook Pro with Mac Os X vers. 10.6.3, processo 2.53 GHz
Interl Core 2 Duo, memory 4GB.
I'm importing function made with Matlab, but I'm encountering errors
with the "input" function.
When I use the next command:
r=input('test')

I receve the next error message:
test2
In /Applications/FreeMat.app/Contents/Resources/toolbox/io/
input.m(input) at line 37
In docli(builtin) at line 1
In base(base)
In base()
In global()
Error: Too many inputs to function evalin

While when I use the other form of "input" it does work:
r=input('test','s')
test1
r =
1

Why in the first mode "input" doesn't work?

Best regards
keyopen

--
You received this message because you are subscribed to the Google Groups "freemat" group.
To post to this group, send email to fre...@googlegroups.com.
To unsubscribe from this group, send email to freemat+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/freemat?hl=en.

Timothy Cyders

unread,
May 21, 2010, 11:31:11 PM5/21/10
to fre...@googlegroups.com
This is a bug, which as far as I know has been fixed in the most current build, but not in the most current Mac release - I believe the latest incremental release was only done as a Windows executable. A workaround for previous versions was discussed on the freemat group:

<quote>
Paul,

This is a bug. Correct fix requires recompiling Freemat and I'll include it in the next release.

Here's a workaround that should give you 99% of the functionality.

You need to open input.m file (you can just type "edit input" in FreeMat) and replace line 37 that says

y = evalin('caller',a,'0;printf(''
%s\n'',lasterr);needval=1;');
with
y = eval(a,'0;printf(''%s\n'',lasterr);needval=1;');


you will be able to give numerical inputs, but you won't be able to input expressions. Hope this solves your problem.

Eugene

</quote>


Reply all
Reply to author
Forward
0 new messages