slices

버전 1.0.0.0 (2.44 KB) 작성자: Jeremy Manning
Slice a tensor (n-d matrix) along the d^th dimension.
다운로드 수: 634
업데이트 날짜: 2012/3/3

라이선스 보기

%SLICES return a cell array of slices of a tensor along the specied dimension
%
% This function is useful for slicing high-dimensional images (e.g. fMRI
% images) into lower-dimensional pieces. The output can then be either
% processed directly, or passed into cellfun or arrayfun for further
% processing.
%
% USAGE:
% x = slices(m,[d])
%
% INPUTS:
%
% m: a tensor (i.e. multi-dimensional matrix) that you wish to slice
%
% d: the dimnsion along which you wish to make the slices. default:
% d = ndims(m).
%
% OUTPUTS:
%
% x: a 1 by size(m,d) cell array of slices of m. each element of the
% cell array is an (ndims(m) - 1)-dimensional tensor.
%
% EXAMPLE:
%
% %create a tensor to slice
% m = reshape(1:100,10,10);
%
% %slice along first dimension: returns rows of m
% s1 = slices(m,1);
%
% %slice along second dimension: returns columns of m
% s2 = slices(m,2);
%
% %slice along third (or greater) dimension: returns m as a cell array
% s3 = slices(m,3);
%
% SEE ALSO: REPMAT, CELLFUN, ARRAYFUN, JOIN
%
% AUTHOR: JEREMY R. MANNING
% CONTACT: manning3@princeton.edu

인용 양식

Jeremy Manning (2024). slices (https://www.mathworks.com/matlabcentral/fileexchange/35439-slices), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
도움

받음: join

줌: 2d and 3d brain plots

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0