Mask "icon drawing commands" (plot icon axes & plot the correct way round!!) and map editor button in mask

2 vues (au cours des 30 derniers jours)
I have a few questions about masks that I am struggling to solve:
1. How can I get axes to display in the mask (short of drawing a couple of lines using plot). If anybody's got the icon drawing commands for making my mask look exactly like a n-D lookup block, that would be ideal.
2. removed!
3. I believe it is not possible to put a button on the mask parameters pop-up box, but I have seen a way to do it via callbacks and tickboxes. The only problem is I do not know what the command is to launch the map editor, as happens when I press the "edit table and breakpoints..." button in lookup table properties.
Since I'm asking, is there a simple way of creating a n-D lookup table block or mask where the 2 inputs are swapped (eg top input goes to the x axis, not the y). That's all I'm trying to do!
Any help appreciated
Leo

Réponses (1)

Leo
Leo le 28 Juin 2013
Well I've managed to get most of the the way there. So here's my solution
In "icon drawing commands" insert
text(0.5,1,'Map text','horizontalAlignment','center','verticalAlignment','top') plot(vertcat(ones(1, length(BreakpointsForDimension1)+1)*-10000,(vertcat(Table/((max(Table(:))-(min(Table(:))))),zeros(size(BreakpointsForDimension2)))'-min(Table(:)/((max(Table(:))-(min(Table(:)))))))*0.8)) dummy=ones(1,length(BreakpointsForDimension2)+1)*-10000 dummy(1,2) = 0.8 plot(dummy) port_label('input',1,'X') port_label('input',2,'Y')
I feel the map should accept X as first input, Y as second input. All I have done is swapped the inputs inside the block and promoted to the mask the following:
Table BreakpointsForDimension1 BreakpointsForDimension2
from the n-D map inside.
The plot icon on the mask also displays like I think it should. Lines consisting of the ROWS of my table, not the columns.
The only thing left is to find the command that launches the Lookup Table Editor and add a tickbox for it with a callback. Will post solution if I find one.

Catégories

En savoir plus sur Author Block Masks dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by