Matlab - using symbolic variables for a for loop with numeric inputs

I am new to Matlab therefore please excuse the simplicity of my question:
I am calculating option prices and throughout my calculations I have defined certain variables as symbolic variables in order to integrate the functions in terms of these variables.
However, once I have all my equations I need to create a for-loop with a range of numeric values for these said symbolic variables. However, I receive following error message:
"Error using sym/subsindex (line 769) Invalid indexing or function definition. When defining a function, ensure that the arguments are symbolic variables and the body of the function is a SYM expression. When indexing, the input must be numeric, logical, or ':'. Error in sym/subsref (line 814) R_tilde = builtin('subsref',L_tilde,Idx);"
How can I fix this?
Thank you very much
Chloe

Respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 21 de Mzo. de 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by