1. ## Question in matlab

Hi All
I want to ask question on matlab
if we write the following statement in M-file

for i=1:10
for j=1:10
a(i,j)=input('a(i,j)=')
end
end
so the program print the following
a(i,j)=
a(i,j)=
.
.
.
.a(i,j)
now the question How can create a program print the following
a(1,1)
a(1,2)
..
.
.
.
a(10,10)

Best regard

2. Originally Posted by raed
Hi All
I want to ask question on matlab
if we write the following statement in M-file

for i=1:10
for j=1:10
a(i,j)=input('a(i,j)=')
end
end
so the program print the following
a(i,j)=
a(i,j)=
.
.
.
.a(i,j)
now the question How can create a program print the following
a(1,1)
a(1,2)
..
.
.
.
a(10,10)

Best regard
Code:
for i=1:10
for j=1:10
a(i,j)
end
end

3. Originally Posted by alexmahone
Code:
for i=1:10
for j=1:10
a(i,j)
end
end
no, it is not walk .moreover, I must inter the value of a(i,j)

4. Originally Posted by raed
no, it is not walk .moreover, I must inter the value of a(i,j)

ss=[ 's(' , num2str(i) , num2str(j), ')' ];disp(ss);

CB

5. Originally Posted by CaptainBlack
ss=[ 's(' , num2str(i) , num2str(j), ')' ];disp(ss);

CB
But this is print the following
a(11)
a(12)
.
.
.
.
a(1010)

it is good but can we print as the following:
a(1,1)
a(1,2)
.
.
a(10,10)

thank you?

6. Originally Posted by raed
But this is print the following
a(11)
a(12)
.
.
.
.
a(1010)

it is good but can we print as the following:
a(1,1)
a(1,2)
.
.
a(10,10)

thank you?
Look at the code, see what it does and why, then make the change that is needed to achieve the effect that you want.

It summarise, you have enough information to do what you want if you make the least bit of effort to understand what you have been shown.

CB