Path: news.mathworks.com!not-for-mail
From: "Eddy " <grotehaas@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: input problems: beginner in matlab
Date: Mon, 17 Sep 2007 20:50:05 +0000 (UTC)
Organization: Hoge school arnhem nijmegen
Lines: 24
Message-ID: <fcmp9t$3vj$1@fred.mathworks.com>
Reply-To: "Eddy " <grotehaas@mathworks.com>
NNTP-Posting-Host: webapp-06-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1190062205 4083 172.30.248.36 (17 Sep 2007 20:50:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 17 Sep 2007 20:50:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 482290
Xref: news.mathworks.com comp.soft-sys.matlab:428986



x=[1:1:10]
fprintf('please enter a function like sin cos exp etc,\n')
fprintf('the calculation performed will be like
pfun(funct(x)),\n')
fprintf('where funct is your function and x= 0 to 10
increment with 1,\n')
funct=input('function funct=','s')
pfun=funct'(x)'

In the technical course we are starting to learn Matlab for
signal processing.
So now we have to do all kinds of exercises, and I do like it.
But one thing does not fall in to place.
In the above script I prompt for a input from the user and
store this in a variable 'funct' the input is as a string.
now I want to use what is in the string to doe some
computing but this last step will not succeed.
So if the input would be sin the computation should be sin(x)

Can somebody help me with this probably syntax problem??

thanks

Eddy