when i add 's' when writing a program for matrix in script then there is no space between the eelements of any row
Show older comments
fprintf('FIRST TYPE NUMBER OF ROWS AND COLUMNS\nTHEN TYPE THE VALUES OF THE ELEMENTS\nIN THE SEQUENCE OF\n(1,1),(1,2),...,(1,n),(2,1),(2,2),...,(2,n),...,(m,1),(m,2),...,(m,n)\nWHERE (r,c) MEANS THE ELEMENT OF\nrth ROW AND cth COLUMN.\n')
m=input('ENTER NUMBER OF ROWS : ');
n=input('ENTER NUMBER OF COLUMNS : ');
for r=1:m
for c=1:n
MATRIX(r,c)=input('ENTER THE VALUE OF THE ELEMENT : ','s');
end
end
MATRIX
Accepted Answer
More Answers (0)
Categories
Find more on Dates and Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!