Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
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 Kommentar
Matt Rulli
Matt Rulli am 8 Apr. 2019
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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Energy Production finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by