⛄一、获取代码方式
获取代码方式1:
完整代码已上传我的资源:【物理应用】基于matlab全矩阵数据TFM成像【含Matlab源码 1940期】
点击上面蓝色字体,直接付费下载,即可。
获取代码方式2:
付费专栏Matlab物理应用(初级版)
备注:
点击上面蓝色字体付费专栏Matlab物理应用(初级版),扫描上面二维码,付费29.9元订阅海神之光博客付费专栏Matlab物理应用(初级版),凭支付凭证,私信博主,可免费获得1份本博客上传CSDN资源代码(有效期为订阅日起,三天内有效);
点击CSDN资源下载链接:1份本博客上传CSDN资源代码
⛄二、部分源代码
function out = image_domain(fmc, zMin, zMax, zResolution, xResolution)
% out = image_domain(fmc, zMin, zMax, zResolution, xResolution)
%==========================================================================
% Calculates the distances between the array elements and the specified
% domain pixels assuming a homogeneous media.
%
% Input:
% fmc struct
% zMin [mm]
% zMax [mm]
% zResolution pixels/[mm]
% xResolution pixels/[mm]
%
%
% Output:
% domain struct
%
% Example:
% zMin = 25;
% zMax = 50;
% zResolution = 10;
% xResolution = 2;
% domain = image_domain(fmc, zMin, zMax, zResolution, xResolution);
%==========================================================================
%
%==========================================================================
% Transducer coordinates
transducer = [fmc.x’+0.5fmc.cfg.ElementXwidthmm1e-3, zeros(length(fmc.x),1)];
% Pixel coordinates
xRange = interp(transducer(:,1), xResolution);
zRange = linspace(zMin1e-3,zMax1e-3, round(zResolution*(zMax-zMin)) )';
pixels = [kron(xRange,ones(length(zRange),1)), …
repmat(zRange,[length(xRange),1])];
Rx = pdist2(pixels,transducer); % Find distances between pixels and transducer coordinates
% Change Rx from a matrix of distances to number of samples, i.e. indices
% in the Ascans.
Rx = Rx - 0.5 * fmc.cfg.SampleOffsetfmc.cfg.Velocityms/(fmc.cfg.FreqMHz1e6);
Rx = round(Rx/(fmc.cfg.Velocityms / (fmc.cfg.FreqMHz*1e6)));
out.min = abs(min(Rx(😃));
out.max = 2 * max(Rx(😃) - length(fmc.Ascans);
out.Rx = Rx + out.min + 1;
out.xRange = xRange;
out.zRange = zRange;
end
⛄三、运行结果
⛄四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1] 门云阁.MATLAB物理计算与可视化[M].清华大学出版社,2013.
3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除