Using meshgrid is it possible to run a function with a range of variables with every possible combination and plotting on a graph?

7 views (last 30 days)
My current function takes the variables : a, b, x, y, xBar, yBar, amplitude, Rotation_angle.
I put in each of the variables, press run and it gives the answers I need, xD4S and yD4S.
What I would like to do is keep x, y, xBar, yBar, amplitude the same (e.g 400,400,200,200,250) and change a, b and Rotation_angle, running though all the potential values for these 3 variables.
e.g for a= 1:100, b= 1:100 and Rotation_angle = 0:180. That could be with an interval of 1 or 10 ect. Basically so all the combinations are met.
Then I need to plot ANS=xD4S/yD4S on a graph, be able to click on a point on the graph and see what values where used at each point.
If possible it would be good to see if ANS is repeated anywhere.
This might be possible using meshgrid and the use of a matrix?
Any help is appreciated.
Also I wasn't sure on the title so if anyone has a better suggestion please share.
Cheers,
Ollie
  4 Comments
Oliver Horrobin
Oliver Horrobin on 18 Feb 2021
The exact way I'm afraid would be too difficult to share, but simpely put I press run on this
genGauss(60,10,200,200,100,100,250,145)
d4sigma(Beam);
genGauss creates an image.The image is rotated in genGauss and saved to the workspace. Then d4sigma uses the image, working with another function to calculate moments of the image. These are used in an equaton to calculate xD4S and yD4S which are saved to the workspace

Sign in to comment.

Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!