help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error with Octave


From: Colin Macdonald
Subject: Re: Error with Octave
Date: Tue, 11 Oct 2016 09:49:03 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 11/10/16 05:10, Nicholas Jankowski wrote:
I don't generally work with symbolics, so I don't know if (a) there's a
way to do a type conversion for numerical symbolic variable. Or (b) if
there's a symbolic interpolation function.

(a) yes, cast to double:

>> ynew = double(subs(y,'w',0:0.05:10));

But I think it'll be slow and give lots of warnings. It might be better to do something like:

>> y_fcn = function_handle(y);
>> ynew = y_fcn(0:0.05:10);

(b) no, at least not yet.

If you have reason to believe this should work (matlab compatibility,
documentation, let us know)

+1 for this. "Substituting a double array into a symbolic expression" seems to be a common thing that folks want to do. Is there is supposed to be an easier way?

best,
Colin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]