How to plot two vectors and one matrice

1 view (last 30 days)
Jan Klimaszewski
Jan Klimaszewski on 4 Dec 2021
Commented: Benjamin on 4 Dec 2021
Right now I am doing a parameter sweep and I am trying to convert my data to a 3D graph to show the results in a very nice fashion. The problem is that I don't quite know how to plot it as I am having an issue with the result variable.
mute_rate = [0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625]
mute_step = linspace(-2.5, 2.5, 6)
results = [949.58, 293.53, 57.69, 53.65, 293.41, 1257.49;
279.19, 97.94, 32.60, 29.52, 90.52, 286.94;
32.96, 28.06, 19.56, 6.44, 13.47, 55.80;
2.01, 1.52, 5.38, 1.00, 0.89, 1.41;
0.61, 0.01, 18.59, 0.03, 0.56, 1.22;
1.85, 1.51, 18.64, 18.57, 18.54, 6.90]
So the first row in the result variable presents the results of the mute rate and mute step performed on the population from my genetic algorithm. For example:
0.5, -2.5 = 949.58,
0.5, -1.5 = 293.53,
0.5, -0.5 = 57.69

Answers (1)

Benjamin
Benjamin on 4 Dec 2021
surface(mute_rate,mute_step,results)
  2 Comments
Benjamin
Benjamin on 4 Dec 2021
How about this?
surface(mute_rate,mute_step,results.')

Sign in to comment.

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!