Through a nested-for-loop for n=1 and m=1,3 i want to acquire a matrix A with elements a1 and a2
m_length = 3;
n_length = 1;
a1(n,m) = ((n-1)+m);
a2(n,m) = ((n-1)+m);
A = [a1 a2];
The above would output A as
It takes into account the even values of m too (and equates them to 0).
But what i require is purely the odd values of m (i.e. m=1,3) in the matrix.
What i would like to see is:
PS: In the original problem, n = 0,1,2,3,4...n_length and m = 1,3,5,7,9...m_length.
I shortened m and n and their total lengths for ease of explaining the problem.