Question

Call the data in string

Let say I have a set of matrices apple=[1 0 0 1 0 1]; orange=[1 0 0 1 1 1 1 0]; guava=[1 1 0 1 1 0 1 ...

plus d'un an ago | 2 answers | 0

Question

To know what number is not available in an array.

I have an array A A=[ 1 7 3 8 7 2 6]; Then after sorting the array A, B=sort(A,ascending); B=[1 2 3 6 7 8]; How can I know ...

plus d'un an ago | 1 answer | 0

Question

putting the answer in a matrices

I have matrix a. Then, I find which column in each row has number bigger than 1. The code is as below a = 5 0 0...

plus d'un an ago | 2 answers | 0

Question

Creating possible addition of a number

I have a set of array A A= [1 2 4 8 16] For example I want a set of number that make up total of 4 (from A), it would be B=[1...

plus d'un an ago | 2 answers | 0

Question

generating sequence of given numbers

Given an array A A=[0 1 2] How can I generate different sequence of number in that array like below; A=[0 2 1] A=[1 0 2] A=...

plus d'un an ago | 1 answer | 0

Question

To get the column number of max and min number

I have an array, a=[ 1 5 3 7 4] How can I get the position of max and min numbere? The answer should be max = 4 %(number 7 w...

plus d'un an ago | 2 answers | 0

Question

Create a frequency table with the available number

I make a frequency table of an array using the below command tabulate([1 2 4 4 3 4 7]) The result is as below Value Count...

plus d'un an ago | 1 answer | 0

Question

Take the array which is less than 3

I have this marix A= [ 1 0 1 0 1 0 1 1 1 1 1 1 0 0 0 1 0 1 3 3 3] How can I take only value less than 3? The result should be...

plus d'un an ago | 1 answer | 0

Question

Cant find the number of row for big size of matrix

I have a tblBarray matrix of size 13x1 1 3 2 5 4 10 8 11 12 14 15...

plus d'un an ago | 2 answers | 0

Question

To find the location of maximum number

I have a array a= [1 2 5 7 7 5 3] I want to get the location of the maximum number(for this example =7) I use this code [x,y...

plus d'un an ago | 1 answer | 0

Question

Return back to the main function after while loop

I have this code table = [ 0 2 2 2 ; 1 0 0 2; 1 0 1 2; 1 1 0 0; 1 1 0 1]; code =[ 0 0 1 1 0 1 1 1 0 0 1 1 1 0 0 0]; n=1;resu...

plus d'un an ago | 0 answers | 0

Question

Find number of row in a table.

I have the following table tblB = Symbol Count ______ _____ 1 25 3 8 ...

plus d'un an ago | 2 answers | 0

Question

Get the probability of a matrices

I have a matrix E1 1 1 4 5 1 1 3 1 1 1 2 5 1 1 1 1 3 ...

plus d'un an ago | 1 answer | 0

Question

How to repeat the first number only

Array a is given a =[1] How can I add 0 to the array depending on n. n=1 --> a=[0 1] n=2 --> a=[0 0 1] n=3 --> a=[0 0 0 1] ...

plus d'un an ago | 2 answers | 0

Question

How to add 1 into the array

I have an array M =[1 0 0] How can I add 1 into the array so the answer will be N=[1 0 1] If I add other 1, the answer will ...

plus d'un an ago | 2 answers | 0

Question

Take value from matrix and add value .

Matrix S is given S= [ 0 0 0 0 0 1 0 0 0 0] I want to take 1st three number of second row which is 100 and then add with...

plus d'un an ago | 1 answer | 0

Question

To create zeros according to the length

I have array named lengthcode lengthcode = [1 3 3 4 4 5 5 5 6 6] From the lengthcode I want to create a zero number based on t...

plus d'un an ago | 1 answer | 0

Question

How to get the columns of non zero matrix?

I have a matrix named A a= [1 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0; 0 1 0 0 0 0 0 0 0 0;...

plus d'un an ago | 1 answer | 0

Question

Add a number(specific column) to vector without deleteing it.

I have an vector a= [1 2 3 4 5 6 7 8] How can I add 2.5 into the vector a at any location( in this example I want it to be at ...

plus d'un an ago | 3 answers | 0

Question

To group the matrix based on the number on their column (of non-zeros)

I have a matrix below;- Matr = 0 0 0 0 1 0 0 0 2 0 0 1 1 ...

plus d'un an ago | 1 answer | 0

Question

Find the number of rows and columns of non-zero number from certain row.

Given a matrix named Matr below; Matr = 0 0 0 0 1 0 0 0 2 0 0 1 ...

plus d'un an ago | 1 answer | 0

Question

Find the number of rows and column of non-zero number(1st)

Given matrix of Mat. How can I find the number of row & column of the 1st non-zero number? Mat = 0 0 0 0 ...

plus d'un an ago | 1 answer | 0

Question

How to compare two table?

a= [ 1 0 0 ; 0 0 0; 1 0 0] new=[0 0 1] % the row to be replace a(2,:)=new % replace row 2 in a with new How can...

plus d'un an ago | 2 answers | 0

Question

How to check the number of ones from certain row to the 1st row?

t(:,:,1) = 1 10 19 28 37 46 55 64 73 82 2 11 20 29 38 47 56 65 ...

plus d'un an ago | 2 answers | 0

Question

How to check the number of ones from certain row to the 1st row?

t(:,:,1) = 1 10 19 28 37 46 55 64 73 82 2 11 20 1 38 47 56 65 74...

plus d'un an ago | 1 answer | 0

Question

How to get the column number that have ones in a row?

t(:,:,1) = 1 10 19 28 37 46 55 64 73 82 2 11 20 29 38 47 56 65 ...

plus d'un an ago | 1 answer | 0

Question

To get the row and column of element in a matrix.

I have 3D matrices. t(:,:,1) = 1 10 19 28 37 46 55 64 73 82 2 11 20 29 38 ...

plus d'un an ago | 2 answers | 0

Question

How to get the column and vector of 2nd ones in a matrices?

I have 3D matrices t(:,:,1) = 1 10 19 28 37 46 55 64 73 82 2 11 20 29 38 ...

plus d'un an ago | 1 answer | 0

Question

Get the last 5 column for 1st row

I have 3D matrices t(:,:,1) = 1 10 19 28 37 46 55 64 73 82 2 11 20 29 38 ...

plus d'un an ago | 1 answer | 0

Question

Make a vector for given number.

How can I make a vector for given number end with 9. For example I want 5 elements. A = [7 8 8 9 9] For 4 elements B=[8 8 ...

plus d'un an ago | 1 answer | 0