Publishing a script that displays and example input from the expression window of the publisher?

2 次查看(过去 30 天)
I'm working on a script that calculates the shipping cost of a package based on the weight of the package (as entered by the user in an input prompt). I want to publish as a PDF that calculates the cost at a weight that I enter in the expression window of the publishing editor, but no matter what format I use, the script doesn't utilize the input. How can I get the script to run using an example value for the package weight without removing the "input" prompt from the code?
  1 个评论
Matt Rulli
Matt Rulli 2019-4-8
weight = input(' Enter package weight [lbs]: ');
I want to keep this in my code, but I want it to display a computed value for a weight I enter in the expression window of the publisher. How do I bypass this portion of the code so my published PDF will display a price for an arbitrary weight entered in the expression window?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Energy Production 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by