If you just need a quick way for the user to enter three numbers for y and then plot against the fixed x = [0 0.02 0.05], you can use “inputdlg” to prompt for values and then plot them as in the below code:
X = [0 0.02 0.05];
answ = inputdlg({'Y(1):','Y(2):','Y(3):'}, 'Enter Y values', 1, {'0','0','0'});
When you run this, MATLAB will show a dialog with three boxes for the user to enter values of “Y(1)”, “Y(2)”, “Y(3)”. After clicking OK, it will plot those points against [0 0.02 0.05].
You can refer to the below attached documentation links for reference:
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
Translated by
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.