MATLAB R2020b
Windows 10.0.19044
k-Wave 1.4
Following definition of a linear array with kWaveArray.addRectElement, the .plotArray method returns an error that "rect is not a valid array element type." (otherwise condition at line 1145 of kWaveArray.m).
This doesn't affect simulation functionality, just visualization.
------- MWE -------
clear all;
close all;
clc;
% Set sensor positions
pitch = 0.2E-3; % [m]
width = 0.18E-3; % [m]
height = 0;
Ne = 128;
xe = Ne.*pitch.*( linspace( 0, 1, Ne ) - 0.5 );
ye = 0.*xe;
% Assign to array
karray = kWaveArray;
for eCount = 1 : Ne
karray.addRectElement( [xe(eCount), ye(eCount)], width, height, 0 );
end
% Plot
karray.plotArray(true);