diff --git a/fMRI_report_app/extras/factork.m b/fMRI_report_app/extras/factork.m new file mode 100644 index 0000000..373fc9c --- /dev/null +++ b/fMRI_report_app/extras/factork.m @@ -0,0 +1,12 @@ +function[gridFactors]=factork(X,M) +% factork 1-by-2 factorisation based on a number of divisors +% +% factork(X,M) returns a 1-by-2 matrix whose elements are factors of X, and +% M is the divisor +% +% See also factor +% +% Michael Asghar - November 2023 +F = X./M; +gridFactors = [M F]; +end \ No newline at end of file diff --git a/fMRI_report_app/stability_app.m b/fMRI_report_app/stability_app.m index 866fce5..c8d1656 100644 --- a/fMRI_report_app/stability_app.m +++ b/fMRI_report_app/stability_app.m @@ -33,11 +33,14 @@ ypatch = ypos+patchsize(2); -tiles= 9; % for tiles -theRound = round(nS./tiles); +montage=10; % for tiles +theRound = round(nS./montage); sliceVec = 1:theRound:nS; tiles = length(sliceVec); -grid = factor(length(sliceVec)); + +grid = factork(length(sliceVec),3); + +%grid = factor(length(sliceVec)); mylims = [0 2]; % BROKEN thisSlice = round(size(cleaned_data,3).*(2./3));