Enquiry about the reason for the program not responding to the entered code

When I copy the code (Drude-Lorentz and Debye-Lorentz models for the dielectric constant of metals and water) it appears in the command window (Unrecognized function or variable 'lambda'. Why?

Answers (1)

Are you copying the body of the function from this File Exchange submission into the Command Window? Note that the function requires lambda as one of its inputs. If you're running the code it contains without defining lambda, how should MATLAB know what value it should use for that variable?
Rather than copying the body of the function why not add it to your MATLAB installation using Add-On Explorer and then just call the function with the input arguments it requires?
[And no, I'm not psychic. One of the "Entire Website" files Answers suggested to me in the See Also sidebar was that File Exchange submission.]

2 Comments

I'm not sure if the products I have installed are sufficient, or whether this code requires a specific product.
Thank you
The author of the File Exchange submission claims it only needs MATLAB. If you were calling it correctly but didn't have a product it required I would expect a different error message.

Sign in to comment.

Categories

Asked:

on 30 Sep 2020

Commented:

on 30 Sep 2020

Community Treasure Hunt

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

Start Hunting!