User Tools

Site Tools


matlab:matlab_helpful_hacks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
matlab:matlab_helpful_hacks [2017/05/24 18:34]
igorkagan
matlab:matlab_helpful_hacks [2019/07/10 11:46] (current)
igorkagan
Line 10: Line 10:
 x = {1,​[],​[],​[]};​ find(~cellfun(@isempty,​x)) </​code>​ x = {1,​[],​[],​[]};​ find(~cellfun(@isempty,​x)) </​code>​
  
-==== startup.m ==== 
- 
-When MATLAB starts, it will look for a **pathdef.m** file in its startup directory. 
- 
-Start up folder (in the MATLAB icon | Properties | Start in ) (e.g. D:​\Sources\MATLAB) allows controlling different paths and other settings via startup.m file placed in the folder, e.g.:  
- 
-<code matlab> 
-disp('​Welcome to physiology analysis...'​);​ 
-set_sources_path;​ % set additional paths dynamically,​ e.g.  
-% addpath(genpath('​D:​\Sources\MATLAB'​));​ 
- 
-cd('​F:​\Data'​);​ 
-edit; 
-EditorMacro('​Alt-Control-h',​ @createHeaderComment_dag);​ 
- 
-dbstop if error 
-</​code>​ 
  
 ==== Exiting loop (for / while -> pause) gracefully ==== ==== Exiting loop (for / while -> pause) gracefully ====
Line 69: Line 52:
 </​code>​ </​code>​
  
 +
 +==== Shifting colormaps ====
 +Sometimes the colormap plots are shifted after printing. To fix this:
 +- in Adobe Illustrator,​ click on the colormap, release clipping mask, and go to "​Object",​ "​Rasterize",​ in the "​Resolution"​ part click on the "Use Document Raster Effects Resolution"​.
 +
 +You have to do it for each of the colormaps.
  
  
  
matlab/matlab_helpful_hacks.1495650877.txt.gz ยท Last modified: 2017/05/24 18:34 by igorkagan