How do I fit my data to a cos^2?
조회 수: 11 (최근 30일)
이전 댓글 표시
Hi, I have collected this data of angle and Intensity to show that Malus law works
theta = [90, 110, 130, 135, 150, 170, 180, 190, 210, 225, 230, 250, 270, 290, 310,315,330, 350, 365, 370, 390]
I= [0.0030, 0.6240, 1.3060, 1.3320, 0.9610, 0.1900, 0.0160, 0.1970, 1.1250, 1.3480, 1.2900, 0.5660, 0.0030, 0.5750, 1.6170, 1.6760, 1.0850, 0.1380, 0.0940, 0.2250, 1.2340]
I tried a few ways but when it comes to plotting I obtain very strange stuff like lines far from the points and I think I just didn't understand how you do this. Thank you very much in advance for your help!
댓글 수: 0
답변 (1개)
Kevin Phung
2019년 3월 29일
All I used was the plot function and I got something pretty sinusoidal
theta = [90, 110, 130, 135, 150, 170, 180, 190, 210, 225, 230, 250, 270, 290, 310,315,330, 350, 365, 370, 390]
I= [0.0030, 0.6240, 1.3060, 1.3320, 0.9610, 0.1900, 0.0160, 0.1970, 1.1250, 1.3480, 1.2900, 0.5660, 0.0030, 0.5750,...
1.6170, 1.6760, 1.0850, 0.1380, 0.0940, 0.2250, 1.2340]
figure
plot(theta,I)
does this not work for you?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!