Please every one, how I can draw this figure in Matlab
as in the attachment figure

 採用された回答

Star Strider
Star Strider 2020 年 9 月 7 日

1 投票

Try this:
figure
hp{1} = polarplot([45 160; 0 0]*pi/180, [1 1; 0 0], '--k', 'DisplayName','Induction');
hold on
hp{2} = polarplot([160; 0]*pi/180, [1; 0], '-k', 'DisplayName','Field');
polarplot([40 50; 45 45]*pi/180, [0.8 0.8; 1 1], '-k')
polarplot([155 165; 160 160]*pi/180, [0.8 0.8; 1 1], '-k')
hold off
lgd = legend([hp{1}(1), hp{2}(1)], 'Induction','Field', 'Location','southoutside');
title(lgd, '\itB\rm at 45°')
producing:
.

2 件のコメント

Hassan Abdelazeem
Hassan Abdelazeem 2020 年 9 月 7 日
Thank you indeed for your help really thank you
Star Strider
Star Strider 2020 年 9 月 7 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (1 件)

Hassan Abdelazeem
Hassan Abdelazeem 2020 年 9 月 7 日

0 投票

The figure appear but I recieved this error message as in the attachment file
Regards

3 件のコメント

Star Strider
Star Strider 2020 年 9 月 7 日
There are too many spaces in the handle vector of the legend call. Cell arrays are comma-separated lists, and if spaces appear between the subscript references, this confuses MATLAB.
Note that the extra spaces in the title call will likely also throw an error. This will cause problems for the text interpreter, since spaces in a character vector are significant, and it will not interpret the TeX calls ‘\it’ and ‘\rm’ correctly.
Please just use my code as I wrote it!
Hassan Abdelazeem
Hassan Abdelazeem 2020 年 9 月 8 日
OK, I am so sorry about that now, it is working in a good manner , I appraciate your effort , thank you indded
Regards
Star Strider
Star Strider 2020 年 9 月 8 日
As always, my pleasure!

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangePolar Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by