Info

This question is closed. Reopen it to edit or answer.

How to write a function that changes values within a matrix a certain amount of times, and saves results in a new matrix.

4 views (last 30 days)
I have two matrices, x and y, which are each composed of 400 random values all between 1 and 20. I want to randomly select values of x and change them to a new value (also between 1 and 20), and then use an equation to check the similarlity between x (which has changed at 1 position) and y (which remains unchanged throughout). This similarity value is a number that I would like to save in a separate matrix after each time the function is run, and I want each change in x to be carried over to the next iteration of the function until a certain condtion is met.

Answers (0)

This question is closed.

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!