フィルターのクリア

Plot 1D data of electromagnetics simulation

4 ビュー (過去 30 日間)
dj1du
dj1du 2021 年 10 月 26 日
回答済み: Nipun 2024 年 4 月 15 日
Hello everyone,
I calculated the current on a conducting wire when being exposed to electromagnetic radiation and would like to plot this data in Matlab. The mesh data consists of 50 segments and 49 vertices and the current in each segment is known. For 2D data I successfully used trisurf in the past, but plotting 1D data is new to me. Is there some function like trisurf for 1D data, which gives a result like shown below? A simple graph, in which current and position acts as abscissa and ordinate is no alternative for me, it should be a spatial plot like in the given image.

回答 (1 件)

Nipun
Nipun 2024 年 4 月 15 日
Hi,
I understand that you intend to plot a one dimensional data on a 3D plane in MATLAB as shown in the attached figure.
I assume that you that the data line is parallel to one axis, and at an offset to the other axis. In this case, the data varies along Y, has an offset at Z, and no dependency on X.
You can use the "plot3" function in MATLAB to plot the required data. Consider the following code in which a 1D line is plotted in 3D space.
n = 1000; % number of points
y_coord = linspace(0,100,1000); % data points
x_coord = zeros(size(y_coord)); % x-coordinates are 0
z_coord = 4*ones(size(y_coord));% same offset for all data points
% plot
plot3(x_coord, y_coord, z_coord)
For more information on "plot3" function in MATLAB, refer to the following MathWorks documentation:
Hope this helps.
Regards,
Nipun

カテゴリ

Help Center および File ExchangeView and Analyze Simulation Results についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by