필터 지우기
필터 지우기

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