How I have all three error bars in one figure
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
R1=10
R2=27
R3=10
Rtotalseries=R1+R2+R3
Vs=5
Itotal=Vs./Rtotalseries
V1=(Vs./Rtotalseries).*R1
V2=(Vs./Rtotalseries).*R2
V3=(Vs./Rtotalseries).*R3
V1measured=1.058
V2measured=2.875
V3measured=1.063
V1percenterror=((abs(V1-V1measured)./V1))*100
V2percenterror=((abs(V2-V2measured)./V2))*100
V3percenterror=((abs(V3-V3measured)./V3))*100
errorbar(V1,V1measured,V1percenterror)
errorbar(V2,V2measured,V2percenterror)
errorbar(V3,V3measured,V3percenterror)
=> I'm trying to get all three error bar codes in a single plot figure
0 Kommentare
Antworten (2)
Star Strider
am 29 Jan. 2024
R1=10
R2=27
R3=10
Rtotalseries=R1+R2+R3
Vs=5
Itotal=Vs./Rtotalseries
V1=(Vs./Rtotalseries).*R1
V2=(Vs./Rtotalseries).*R2
V3=(Vs./Rtotalseries).*R3
V1measured=1.058
V2measured=2.875
V3measured=1.063
V1percenterror=((abs(V1-V1measured)./V1))*100
V2percenterror=((abs(V2-V2measured)./V2))*100
V3percenterror=((abs(V3-V3measured)./V3))*100
figure
hold on
errorbar(V1,V1measured,V1percenterror)
errorbar(V2,V2measured,V2percenterror)
errorbar(V3,V3measured,V3percenterror)
hold off
Make appropriate changes to get the result you want.
.
0 Kommentare
Walter Roberson
am 29 Jan. 2024
R1=10
R2=27
R3=10
Rtotalseries=R1+R2+R3
Vs=5
Itotal=Vs./Rtotalseries
V1=(Vs./Rtotalseries).*R1
V2=(Vs./Rtotalseries).*R2
V3=(Vs./Rtotalseries).*R3
V1measured=1.058
V2measured=2.875
V3measured=1.063
V1percenterror=((abs(V1-V1measured)./V1))*100
V2percenterror=((abs(V2-V2measured)./V2))*100
V3percenterror=((abs(V3-V3measured)./V3))*100
errorbar(V1,V1measured,V1percenterror)
hold on
errorbar(V2,V2measured,V2percenterror)
errorbar(V3,V3measured,V3percenterror)
hold off
The third error bar is so close to the first error bar that it is easy to confuse them.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!