필터 지우기
필터 지우기

I would like to know how to find the slope for three different line in one graph

조회 수: 3 (최근 30일)
I have tried multiple times but I'm unsure what to do. I have attached a photo of my data and codes

답변 (1개)

Star Strider
Star Strider 2021년 9월 4일
I have no idea what you want to do.
Try this —
V = [5 10 15];
I1 = [0.00487 0.00964 0.0145];
I2 = [0.00106 0.0021 0.00316];
I3 = [0.0006 0.0012 0.00175];
format short g
R1 = diff(V)/diff(I1)
R1 =
1038.3
R2 = diff(V)/diff(I2)
R2 =
4761.5
R3 = diff(V)/diff(I3)
R3 =
8679.2
format short
figure
plot(I1, V, '.-')
hold on
plot(I2, V, '.-')
plot(I3, V, '.-')
hold off
grid
The resistances are the slopes of the lines. They all appear to be perfectly linear, so diff works here. If they were not, a linear regression would be required to calculalte the slope.
.

카테고리

Help CenterFile Exchange에서 Directed Graphs에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by