How should I configure the 'Publishing Options' so that I don't get an error when user input is required?
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
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.
Accepted Answer
Sean de Wolski
on 11 Mar 2014
Perhaps you could use an inputdlg to ask for user feedback?
txt = inputdlg('input');
12 Comments
Golnar
on 11 Mar 2014
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)
Golnar
on 11 Mar 2014
Changed it. But the error remains:
Cannot call INPUT from EVALC.
Apparently you have input somewhere else. Or you haven't saved the file..
Golnar
on 11 Mar 2014
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')
Golnar
on 11 Mar 2014
You are incredible! I fixed it. Thank you.
Golnar
on 11 Mar 2014
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)
Golnar
on 11 Mar 2014
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
More Answers (0)
Categories
Find more on MATLAB Report Generator in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)