Community Profile

photo

Hang Vu


Last seen: 2 månader ago Active since 2019

Statistics

  • Thankful Level 3

View badges

Content Feed

View by

Question


How to plot the curve?
I have: k=2, 2.1, 2.2, 2.3, …, 4.9, 5.0 B=[0.2,0.4,0.6,0.8,1]; R=B/(1+k/2) How to plot R like this: Thank you!

ungefär 3 år ago | 1 answer | 0

1

answer

Question


How to find the index of top k max values in the matrix
A=[ 5 40 10 9 2 1 8 12 33 23] find index of top 3 max values as:B= [ 2 9 10] and return the rest index value in another array ...

ungefär 3 år ago | 2 answers | 0

2

answers

Question


How to Permute the array with specific number?
I want to keep 1,2,6,7,9,10, they will not move I have this array b=[1,5,2,8,6,11,7,9,3,10] P=perms(b); HOw to use perms fo...

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

2

answers

Question


How to connect the multi scatter?
I want to connect pone in a line follow the for loop, the same for ptwo. And suppose that I have 2 first points. This is my code...

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

1

answer

Question


How to remove the duplicate in the cell array but still keep the array structure?
A={[3 11];[6 5 8];[ 11 5];[5]}; I wonder if there is any way to remove the duplicate numbers in A but still keep the dimension ...

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

1

answer

Question


How to delete the duplicate number or using unique in the cell?
Let's see if I have A: A={[3];[6 8 3];[5];[10 5]} I am trying to delete the duplicate numbers and found that 'unique' can retu...

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

1

answer

Question


How to insert the missing number into the cell array?
Suppose that I have this I=[3 5 6 8 10 11] A={[3];[6;8];[];[11]} How to find the missing number of I in A and insert that num...

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

1

answer

Question


How can I get the number between 2 numbers?
I have 2 arrays and the index of the stable numbers(n) n=[1 2 7 9]; PA = [1 3 10 1 2 8 6 2 7 11 7 9 5 9]; PB = [1 10 1 2 11 6...

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

2

answers

Question


How do I use if with the value of the array is a string?
I want to check if the final value of the string is 'NaN' parents=[2 3 1 NaN]; f = parents(size(parents,2)); if f == 'NaN' ...

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

1

answer

Question


How to randomly swap 2 elements in an array?
Suppose that I have the below array: C= [1 6 5 10 1 2 11 8 2 7 3 7 9 9] How...

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

1

answer

Question


How can I create a random array like the example below?
A=[1 1 2 2 7 7 9 9] B=[3 5 6 8 10 11] : randomly choose all items from B and input between 2 same number of A between same bum...

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

1

answer

Question


How can I mat2cell the array?
Suppose I have this: v= {1 8 1 1 6 1 2 5 3 2 7 11 7 9 10 9}; How can I mat them as below? ( with array start and end as same n...

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

2

answers

Question


How to create a matrix from for loop result?
I repelem the element by the index D = [170, -80, -30, 0, -50, -30, 20, -60, 100, -60 -20]; Iplus=find(D>0); for i=1:size(I...

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

1

answer

Question


How can I create a random array like the example C?
A=[1 1 2 2 7 7 9 9] B=[3 5 6 8 10 11] : randomly choose all items from B and input between 2 same number of A for example : C...

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

1

answer

Question


How can I make an array with randomly choose from another matrix?
A=[1 2 7 9] => how to build A like this> A=[1 1 2 2 7 7 9 9] B=[3 5 6 8 10 11] : randomly choose all items from Band input bet...

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

1

answer

Question


How can I keep just the arrays with 2 is before 3 after random swap 2 numbers.
with: s=[1,2,3,4,5];

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

2

answers