matlab:matlab_helpful_hacks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
matlab:matlab_helpful_hacks [2015/09/13 22:52] – igorkagan | matlab:matlab_helpful_hacks [2018/11/01 06:03] – igorkagan | ||
---|---|---|---|
Line 37: | Line 37: | ||
... | ... | ||
drawnow; pause; | drawnow; pause; | ||
- | if get(gcf,' | + | if get(gcf,' |
break; | break; | ||
end | end | ||
Line 45: | Line 45: | ||
+ | ==== Finding indices between two vectors of start and end indices, using arrayfun ==== | ||
+ | |||
+ | Assume we have two vectors, repeated_segments_start_idx, | ||
+ | |||
+ | <code matlab> | ||
+ | idx = [repeated_segments_start_idx(segments2remove_idx): | ||
+ | |||
+ | idx = cell2mat(arrayfun(@colon, | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Maximize figure window ==== | ||
+ | <code matlab> | ||
+ | |||
+ | |||
+ | |||
+ | ==== Plot an '' | ||
+ | |||
+ | <code matlab> | ||
+ | h = imagesc(X, | ||
+ | set(h,' | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Shifting colormaps ==== | ||
+ | Sometimes the colormap plots are shifted after printing. To fix this: | ||
+ | - in Adobe Illustrator, | ||
+ | |||
+ | You have to do it for each of the colormaps. | ||
matlab/matlab_helpful_hacks.txt · Last modified: 2022/12/29 07:15 by 127.0.0.1