Hi, I want to make a polar plot using data I have from excel. I'm measuring the intensity of a laser while using a polarizer. My one column is the degree of rotation from 0-360 in increments of 10s, and my second colum is the intensity measured at each angle. Thank you in advance

 採用された回答

Star Strider
Star Strider 2021 年 9 月 30 日

0 投票

The polar and polarplot functions require the angles to be in radians.
So using degrees requires the deg2rad function —
angles = linspace(0, 360, 50);
radius = sind(angles).^2;
figure
polarplot(deg2rad(angles), radius)
.

2 件のコメント

jcc
jcc 2021 年 9 月 30 日
Thank you for your help, but if I could ask one more question as far as using the my excell dataset. Should I be using the xlsx function or xlsread function for matlab to be able to use my data? thanks again for your help!
Star Strider
Star Strider 2021 年 9 月 30 日
My pleasure!
Since you are using R2021a (thank you for adding that), use the readtable or readmatrix function to read the .xlsx file. (Also, R2021b is available for download and installation.)
.

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

その他の回答 (0 件)

カテゴリ

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

製品

リリース

R2021a

質問済み:

jcc
2021 年 9 月 30 日

コメント済み:

2021 年 9 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by