todo

Pitfall - reshape

When using reshape, remember that it is filled column wise not row wise. This decides the order of new dimensions. For example, you have 10 things, u want to make into bins of 5[1 - 5, 6-10]. The reshape dims should be 5,2 NOT 2,5

Untitled

find ci interval

How to calculate the confidence interval - MATLAB Answers - MATLAB Central (mathworks.com)

visualizing length, sig and means at one plot

figure
    csi_mean2 = nanmean(csi_mean, 2);
    plot(csi_mean2) % plot
    h = cell2mat(across_rebf(1:13, 3));
    % put a star at the value
    h_plot = h.*csi_mean2;
    % replace zeros with nan
    h0_pos = find(h_plot == 0);
    h_plot(h0_pos) = nan;
    hold on
        % put a red spot only at sig=1
        plot(h_plot, 'o',  'MarkerFaceColor',[1 .6 .6], 'MarkerSize', 10)
        % put number as length of array
        for i=1:13
            [text(i, csi_mean2(i), num2str(across_rebf{i,2}), 'color', 'black')](<https://groovy-locust-6a6.notion.site/d121516a2acc480a9db37318a5de94a8>)
        end
    title(strcat('seg-', num2str(seg)))
grid

Untitled

put number as marker on plot

x = 0:1:10;
y = sin(x);
plot(x,y,'-r')
hold on
for ii = 1:length(x)
    text(x(ii),y(ii),num2str(ii),'Color','r')
end

put markers on imagesc plot

Overlay imagesc with crosses - MATLAB Answers - MATLAB Central (mathworks.com)

imagesc(A)
hold on
plot(col_num,row_num,'marker','x','MarkerSize',165,'Color','white')

visualise a matrix with nan values using imagesc