photo

nitin jain


自 2017 起处于活动状态

Followers: 0   Following: 0

统计学

  • Thankful Level 1

查看徽章

Feeds

排序方式:

提问


I have a vector x=[2 3 4 5] and value of x change at each iteration.I want to compare value of x at current iteration with value of x at previous iteration.So how can i store value of x at previous iteration.
eg- for i=1:10 x=[2 3 4 5] x_new=[5 3 2 4]%after some calculation value of x at next iteration compare x with x_new

7 years 前 | 1 个回答 | 0

1

个回答

提问


I have a row vector x which is random permutation of r where r=1:15 .I want to make a program in which whenever value of r is equal to x increase the counter else counter contain previous value.
first check the which element of array is equal to r and the if is equal then increment the count by one.

7 years 前 | 0 个回答 | 0

0

个回答

提问


how to select two number randomly from an array and perform swapping between these two number?
for example in array A=[1 2 3 5 6 9 10] two number selected randomly are 3 and 6 so after swapping array be like A=[1 2 6 5 3 9...

7 years 前 | 1 个回答 | 0

1

个回答