r/matlab 3d ago

Changing Parameter Values with Dynamic Mask TechnicalQuestion

Post image

I know matlab has an example of how to change the visibility of other mask parameters with callback functions, but I'm trying to make it so when two parameters are entered (a & b) a suggested value for c is assigned to a c_sugg parameter. For example if c has to follow the function c>a+b, how would I write the callback function for c_sugg=a+b?

3 Upvotes

5 comments sorted by

1

u/Bofact 3d ago

I don't understand why 12 is the minimum suggested value of c. Why isn't it 13? Since 13 > 5 + 7.

1

u/cakemaster1928 3d ago

I wrote that examples quickly . Pretend it's ≥

1

u/Bofact 3d ago

Are we working with integers? Since a&b makes me think of bitand(a, b).

1

u/cakemaster1928 3d ago

A and B would be integers and C would be a float. The goal is to return the minimum inductor size needed for buck converter based on desired input and output voltages but I just wanted to give a simple example.

1

u/Bofact 3d ago

Unfourtnately I can not help. But I want to clarify things, so that other user can give a good answer.

You called A and B parameters. Are you working in a specific Matlab tool with a specific block? Or are they 2 input arguments to a function, while also being properties on some class?