This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
big_display_matlab_code [2015/05/08 14:56] miles90 |
big_display_matlab_code [2015/05/08 14:58] (current) miles90 |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | I have not yet included all necessary file; instead i've included the most important files as examples. | ||
| ==mask_draft1.m== | ==mask_draft1.m== | ||
| Line 73: | Line 72: | ||
| end | end | ||
| end | end | ||
| + | | ||
| + | ==Dmakerect.m== | ||
| + | function out=Dmakerect(sense,vertex) | ||
| + | %returns a box expressed as a 2xN matrix of coors starting at the specified | ||
| + | %vertex: tr, tl, br, bl | ||
| + | %and drawn in the given sense: c, cc etc. | ||
| + | %canonx=[0,0,1,1]; %clockwise bottom left | ||
| + | %canony=[0,1,1,0]; | ||
| + | canonx=[0,0,250,250]; %this is for the wirebonding pads/busses %250 makes it 2500um long, 3 makes 30um high | ||
| + | canony=[0,9,9,0]; | ||
| + | canoncoors=[canonx;canony]; | ||
| + | %********Starting Point and Sense******* | ||
| + | switch vertex | ||
| + | case {'tr','topright'} | ||
| + | if sense=='clockwise'|'c'| 'clk' | 'clock' | ||
| + | canoncoors=circshift(canoncoors,[1,2]); | ||
| + | canoncoors=[canoncoors,canoncoors(:,1)];%first point becomes last point | ||
| + | else | ||
| + | canoncoors=circshift(fliplr(canoncoors),[1,1]); | ||
| + | canoncoors=[canoncoors,canoncoors(:,1)];%first point becomes last point | ||
| + | end | ||
| + | %disp('start top right') | ||
| + | case {'tl','topleft'} | ||
| + | if sense=='clockwise'|'c'|'clk' | 'clock' | ||
| + | canoncoors=circshift(canoncoors,[1,1]); | ||
| + | canoncoors=[canoncoors,canoncoors(:,1)];%first point becomes last point | ||
| + | else | ||
| + | canoncoors=circshift(fliplr(canoncoors),[1,2]); | ||
| + | canoncoors=[canoncoors,canoncoors(:,1)];%first point becomes last point | ||
| + | end | ||
| + | %disp('start top left') | ||
| + | case {'br','bottomright'} | ||
| + | if sense=='clockwise'|'c'|'clk' | 'clock' | ||
| + | canoncoors=circshift(canoncoors,[1,3]); | ||
| + | canoncoors=[canoncoors,canoncoors(:,1)];%first point becomes last point | ||
| + | else | ||
| + | canoncoors=circshift(fliplr(canoncoors),[1,0]); | ||
| + | canoncoors=[canoncoors,canoncoors(:,1)];%first point becomes last point | ||
| + | end | ||
| + | %disp('start bottorm right') | ||
| + | case {'bl','bottomleft'} | ||
| + | if sense=='clockwise'|'c'|'clk' | 'clock' | ||
| + | canoncoors=circshift(canoncoors,[1,0]); | ||
| + | canoncoors=[canoncoors,canoncoors(:,1)];%first point becomes last point | ||
| + | else | ||
| + | canoncoors=circshift(fliplr(canoncoors),[1,3]); | ||
| + | canoncoors=[canoncoors,canoncoors(:,1)];%first point becomes last point | ||
| + | end | ||
| + | %disp('start bottom left') | ||
| + | end | ||
| + | %******** | ||
| + | out=canoncoors; | ||