微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 天线设计和射频技术 > gprmax matlab

gprmax matlab

时间:04-05 整理:3721RD 点击:
please somebody ..
could you give me some examples how to operate this software...
i have done it but having some trouble in 3D visualization in matlab (using GPRMAX3D)...
thanks...

hi,

i've been working just a little with the 3D version of GprMax. For the time being I've used Matlab's "patch" function to visualize the model I've drawn. The results are viewed thanks to the Fields.ez.

Here's what my Matlab program looks like:

Code:
name = 'NameOfYourSimulatedFile.geo';

[mesh,ID,header,media] = gprmax3g(name);
[chem,titre,ext]=fileparts(name);

figure
p1=patch(isosurface(mesh,1));
set(p1,'facecolor',[1,0,0],'edgecolor','none');
p2=patch(isosurface(mesh,2));
set(p2,'facecolor',[0,1,0],'edgecolor','none');

[Header, Fields] = gprmax([name(1:end-3),'out']);
radargram(:,:) = Fields.ez(:,1,:);
t=1e9*Fields.t;
Y = Header.dy * Header.rx: Header.dy * Header.RxStepY :Header.dy * Header.rx + (Header.dy * Header.RxStepY * (Header.NSteps-1));

figure;
imagesc(Y,t,radargram);
title('Ez');
ylabel('Time (ns)');
xlabel('Scan length (m)');

figure;
[x,y]=meshgrid(Y,t);
surf(x,y,radargram,'EdgeColor','none')
view([1,0,0]);
title('Ez' );
ylabel('Time (m)');
xlabel('Scan length (m)');

Hi!
I am trying to use GPRMax 3D as indicated in previous post but i obtained the following error:

------------------------------------------------------------------------------
? Warning: Struct field assignment overwrites a value with class "double".
See MATLAB 7.0.4 Release Notes, Assigning Nonstructure Variables As Structures Displays Warning for details.

> In gprmax3g at 139
In GPRMAX_matlab at 13
? Undefined function or variable 'prova'.

Error in ==> GPRMAX_matlab at 22
[Header, Fields] = gprmax([prova(1:end-3),'out']);
>> ----------------------------------------------------------------

the name of my file is "prova".

Can someone help me?

Thank you!

please

could you give me some examples how to display Three slices through a volume of data.
i have done it but having some trouble in 3D visualization in matlab (using GPRMAX3D)... this is my code, but display the 3D image is incorrect.
this is my code:
-----------------------------------------------------------------------------------------

filename = 'ex3';
geo = '.geo';
sca = '.sca';
geofile = [filename geo];
scafile = [filename sca];

%% Apelle GPR simulation

% *** Select output/results directory
% directory_out = 'C:\GPRModels\Outputs';

% *** Select exe and input directories
% dos 'C:\GprMax\Bin\GPRMax3D C:\GprModels\Inputs\ex4.in'


[mesh,ID,header,media] = gprmax3g(geofile);
[chem,titre,ext]=fileparts(geofile);
modeltitle = header.title;
dx = header.dx; % cell size in x direction - horizontal for GprMax dy = header.dy; % cell size in y direction - vertical for GprMax
nx = header.nx;
dy = header.dy;
ny = header.ny;
x = nx*dx;
y = ny*dy;

% Scan data
[Header,Fields]=gprmax(scafile);
modeltitle = Header.title;
Nsteps = Header.NSteps; % no. of scans in the file
iterations = Header.iterations; % no. of iterations (in the given time window)
dt = Header.dt; % time for each iteration
timew = Header.removed; % time window (s)
ex = reshape(Fields.ex, iterations, Nsteps);
ey = reshape(Fields.ey, iterations, Nsteps);
ez = reshape(Fields.ez, iterations, Nsteps); % reshape scan data into matrix


%% L'affichage de la géométrie de l'image et C-scan

% géométrie
cla
set(gcf,'InvertHardcopy','off')
mesh = squeeze(mesh);
p = patch(isosurface(mesh, 2), 'FaceColor', 'red', 'EdgeColor', 'none');
patch(isocaps(mesh, 2), 'FaceColor', 'interp', 'EdgeColor', 'none');
isonormals(mesh,p);
view(3)
daspect([1 1 .4])
cmap=colormap(gray(100));
camva(9)
box on
camlight(40, 40);
camlight(-20,-10);
lighting gouraud


% % C-Scan
radargram(:,:) = Fields.ez(:,1,:);
t=1e9*Fields.t;
Y = Header.dx * Header.rx: Header.dx * Header.RxStepY :Header.dx * Header.rx + (Header.dx * Header.RxStepY * (Nsteps-1));

figure;
I=imagesc(Y,t,radargram);
colormap(gray(100))
title('Ez');
ylabel('Time (ns)');
xlabel('Scan length (m)')

figure;
[mesh.x,mesh.y,mesh.z] = meshgrid(Y);
xslice = [5,20]; yslice = 20; zslice = [0,10];
colormap(gray(100));
slice(mesh.x,xslice,yslice,zslice);


--------------------------------------------------------------------------
I want to display a 3D image as described in the manual : Three slices through a volume of data(page 53)



Pleas help me
thanks...

Hello could you please help me to run the same codes as examples,my matlab 2014 is saying:

"Undefined function 'gprmax3g' for input arguments of type 'char'.

Error in tryend (line 3)
[mesh,ID,header,media] = gprmax3g('name');" could you please support me on how you proceeded for running those codes?

Thanks.

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top