How should I configure the 'Publishing Options' so that I don't get an error when user input is required?

I have a code that requires user input. I'm 'publishing' the report that is created after the user input with the 'publishing options'. I've excluded the code from being included, for example. But every time I run the publishing command, I get an error as soon as the code gets to the first portion of where user input is needed. Why?
The error that I receive:
Cannot call INPUT from EVALC.

 Réponse acceptée

Perhaps you could use an inputdlg to ask for user feedback?
txt = inputdlg('input');

12 commentaires

Do you suppose that I replace this command with, for example, the previous inputs?
location = input('Location of wound: ','s')
Yes!
location = inputdlg('Location of Wound');
(Frankly, I recommend using this over input() anyway)
Changed it. But the error remains:
Cannot call INPUT from EVALC.
Apparently you have input somewhere else. Or you haven't saved the file..
What does it mean to have an input 'somewhere else'? The code is all right there.
What does the error say? Please post the full error message. It will likely say the offending line, something like this:
Error using input
Cannot call INPUT from EVALC.
Error in Untitledpub (line 12)
input('hello')
You are incredible! I fixed it. Thank you.
Except that now the inputs are not showing in the report. No errors though. I suppose they're not getting saved or something.
location = inputdlg('Location of Wound');
shape = inputdlg('Shape of wound:');
Where do you show them in the report?
It worked for me, i.e.
disp(location)
I made it show. The three inputs: 11-march, location, shape show up with formatting different from desired. Anything that can be done about the spacing and single apostrophe?
Use fprintf to enforce spacing and to concatenate.
how did you manage to take input and publish the result? @Golnar

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Report Generator dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by