Filter löschen
Filter löschen

command window is not working

3 Ansichten (letzte 30 Tage)
Bhavana am 8 Mai 2024
Bearbeitet: Mann Baidi am 8 Mai 2024
x=input("Enter the array of x:");
y = input("Enter the array of y:");
n = length(x)
for i=1:n
for j=2:n
for i=j:n
fprintf("Difference table\n")
  1 Kommentar
Ganapathi Subramanian R
Ganapathi Subramanian R am 8 Mai 2024
Could you please elaborate the issue you are facing?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Mann Baidi
Mann Baidi am 8 Mai 2024
Bearbeitet: Mann Baidi am 8 Mai 2024
I am assuming here that you are facing issue while taking an array as an input from the user using the command window.
For taking user input as an array the syntax is in the form of '[x y z a b c]'.
Otherwise, If you know the length of the input array you can use a 'for' loop for taking the user input for each element in the array.

Community Treasure Hunt

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

Start Hunting!

Translated by