Thread Subject: evaluating expressions obtained from UI. eval alternative

Subject: evaluating expressions obtained from UI. eval alternative

From: Ilya

Date: 15 Mar, 2008 04:41:49

Message: 1 of 1

I often write user interfaces that require user to input
analytical functions into edit boxes.
But I haven't found a MATLAB function specifically designed
to handle the scenario.

I tried different ways to accomplish this:
1. I tried the subs function from symbolic math toolbox -
it's robust, but is veeeery slow ((

2. Now I use eval. But it requires users to input
expressions using non-matrix operators like .+ .* etc.
Moreover, eval is not robust at all: users are able to
execute almost any MATLAB command inside my UI. Yet, eval is
not as fast as I want.

Any suggestions?
TIA

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com