How to increase the length and thickness of the arrows in the EHfields plot

조회 수: 9 (최근 30일)
Hi, I am plotting the E and H field vector on a plane using EHfields(name,freq). The size and thickness of the arrows drawn inside the plot is too small and cannot be seen properly. How do I increase the size and thickness of these arrows.
Attaching a screenshot for your reference.
SCREENSHOT:
Thanks,
Biplob Biswas

채택된 답변

Constantino Carlos Reyes-Aldasoro
Hello
Changing the thickness is not too difficult, but changing the length may be rather complicated. Let me illustrate. You can generate your plot, say I do this
h = spiralArchimedean;
EHfields(h,4e9)
Then, you can grab the handles of your plot
h1=gca;
h1 is the handles of the fields and should have among many other fields, one called children, which will have 2 quivers, grab that again
h2=h1.Children;
>> h2
h2 =
2×1 Quiver array:
Quiver (H)
Quiver (E)
>> h2(1)
ans =
Quiver (H) with properties:
Color: [0.8500 0.3250 0.0980]
LineStyle: '-'
LineWidth: 0.5000
XData: [0 -0.0163 -0.0321 -0.0472 -0.0611 -0.0736 -0.0842 ]
YData: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0050 ]
ZData: [-0.1040 -0.1027 -0.0989 -0.0927 -0.0842 -0.0736 ]
UData: [0.0126 0.0122 0.0113 0.0098 0.0080 0.0062 0.0044 ]
VData: [0.0123 0.0121 0.0114 0.0103 0.0089 0.0073 0.0057 ]
WData: [2.6980e-09 -0.0020 -0.0037 -0.0051 -0.0060 -0.0065 ]
Show all properties
So you can directly modify the linewidth or the marker size
>> h2(1).LineWidth=2;
But to change the length, you would have to change the actual coordinates from where it starts and where it finishes. That will not be that easy. Hope this helps!
  댓글 수: 3
Biplob
Biplob 2023년 6월 3일
There is a way of increasing the length(size) of the arrow vectors by using the following code.
EHfields(arr,2.4e9,ScaleFields=[2 2]);
This above code scales up the length of the arrows by 2 times.
Thank You.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by