Question

comparing values of two matrix

Hi lets say I have 2 matrices A=[1 2 1 2 3 3], B=[1 2 2 1 3 3], i want to compare values of matrix and write in different matrix...

mer än 6 år ago | 1 answer | 0

Question

How to find position of value in matrix and write as another matrix

Lets say i have this matrix A = [1 0; 0 0; 1 1; 0 1; 0 0] Now i want to write the positi...

mer än 6 år ago | 2 answers | 0

Question

creating matrix by iteration 2

Hi Everyone how are You? Can U help with this PLEASE: n=4 for i=1:n s=i if s == 3 for k =1:2 A(i,1) =s A(s+1,1)=s end else A(i,1...

mer än 6 år ago | 2 answers | 0

Question

creating matrix with iteration

lets say I have this code: for i=1:4 sum=1+i end i want program to create a ix2 matrix (1st column values are 3) at each it...

mer än 6 år ago | 2 answers | 0

Question

kronecker product by number of iteration

lets say A=[1 2;3 4], i want for i=1:5 times, to multiply A itself kronecker product. in this case ,manual will be kron(kron(k...

mer än 6 år ago | 1 answer | 0

Question

Kronocker product of iteration sequence

I have this code: A=[1 0 0;1 1 0;0 1 0] I=[1 0;0 1] F2=[2 1;1 2] for i=1:3 B=0; for j=1:3 B=B...

mer än 6 år ago | 0 answers | 0

Question

Sequencing, matrix values and calling function

Lets say I have A=[1 0 0;1 1 0;0 1 0], I=[1 0;0 1], F=[1 2;2 1] matrix, and like this code: for i=1:3 B=0; ...

mer än 6 år ago | 1 answer | 0

Question

Compare values and change them

Lets say i have matrix A=[1 2 3;4 2 7;9 6 1] I want the values less than 5 to be replaced with zero, and bigger than 5 to be re...

mer än 6 år ago | 1 answer | 0

Question

Sequence of adding numbers

Hi i have like this question. Lets say i have this code : for i=1:4 C=2+i; end this gives me this answer: C=3, C=4,C=...

mer än 6 år ago | 2 answers | 0

Question

Sum of the elements of rows of matrix

lets say i have A=[1 2 1;3 2 1;3 5 4] and i want to sum up row elements separately and show me results as "Ri=..." here "i" is n...

nästan 7 år ago | 3 answers | 0

Question

String value and sequently representation

Lets say i have string M=['XASSANORXOOUOU'] and I want something like this for i=1:7 Li=[M(i,i+1)] so that i...

nästan 7 år ago | 2 answers | 0

Question

String value and relate with number.

lets say i have A=21,B=12,C=8,D=7 and Matrix with string value W=['DABCD'], and now lets say when i write: Z=W(1:3) which will ...

nästan 7 år ago | 2 answers | 0

Question

element values of matrix.

Lets say i have matrix A=[1 2 2;1 2 2;2 1 2;2 2 2]. if i do this code: [m,n]=size(A) for j = 1 for i = 1:m ...

nästan 7 år ago | 1 answer | 0

Question

How to find string value?

Lets say i have a matrix in form of string A=['AN1OR1OU1'], And I want to find values separately as AN1, OR1, OU2, i tried this ...

nästan 7 år ago | 1 answer | 0

Question

how to find a value of matrix in a specific position?

Lets say I have a matrix A=[1 2 3;2 4 5;6 5 4] and I want to find value at i=2 j=3 which is 5. But I want that program finds tha...

nästan 7 år ago | 1 answer | 0