[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: how to solve this error mesages from this program?

**From**: |
Colin Macdonald |

**Subject**: |
Re: how to solve this error mesages from this program? |

**Date**: |
Fri, 8 Feb 2019 12:05:18 -0800 |

**User-agent**: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |

On 2019-02-07 7:23 a.m., Doug Stewart wrote:

There seems to be a problem with the eval() function when it is used with
the results from a symbolic calculation.
The function given above calculates a symbolic matrix which it is

`then trying to convert it to a numeric answer. I tried to use double
``instead of
``eval but it still did not work. I then tried subs() to convert each
``symbolic symbol
``to a number and that also failed. In the end I had to convert it to a
``function_handle
`and then evaluate it at the given values.

Thanks! I have filed:
https://github.com/cbm755/octsympy/issues/933

`It would be great if someone can test the attached script in a somewhat
``recent version of Matlab (with the Symbolic Toolbox) and report the
``results, either via email or directly to the bug report.
`

Should the eval function work for this case?

`I'm not sure. I can't find documentation for @sym/eval from the
``Mathworks, perhaps its somewhat deprecated? My theory is it should do
``the same as `double(subs(f))`.
`

``subs(f)` is known not to work (and the error message should make this
``clear). But if people are using these things, then `subs(f)` seems
``semantically better than `eval(f)` so I've filed
`
https://github.com/cbm755/octsympy/issues/934

`These sorts of non-explicit commands are pretty magical (dig around in
``your workspace, find value of variables; I'm not a fan).
`
Colin

**
**`symevaltest.m`

*Description:* Text Data

**how to solve this error mesages from this program?**, *gwestern*, `2019/02/07`
**Re: how to solve this error mesages from this program?**, *Doug Stewart*, `2019/02/07`
**Re: how to solve this error mesages from this program?**, *Doug Stewart*, `2019/02/07`
*Message not available*
**Re: how to solve this error mesages from this program?**, *Doug Stewart*, `2019/02/07`
**Re: how to solve this error mesages from this program?**, *Insang HWANG*, `2019/02/07`
**Re: how to solve this error mesages from this program?**, *Doug Stewart*, `2019/02/07`
**Re: how to solve this error mesages from this program?**,
*Colin Macdonald* **<=**
*Message not available***Re: how to solve this error mesages from this program?**, *Doug Stewart*, `2019/02/07`
**Re: how to solve this error mesages from this program?**, *Hwang*, `2019/02/07`