Plotting a simple coverage equation
조회 수: 2 (최근 30일)
이전 댓글 표시
I am by no means an experienced Matlab user and simply want to simulate the predictions of an expression 1/Rtot=(1-theta)/Ra + (theta/Rb) where theta is an array of coverages and Ra and Rb specified resistors. I am using Rtot=(Ra./(1-theta))+(Rb./(theta)) but this is giving wildly wrong Rtot values so the expression must be formulated incorrectly. Any advice hugely well one - have stared at this for way too long and cant see the fault
댓글 수: 0
채택된 답변
추가 답변 (2개)
Ameer Hamza
2018년 5월 5일
This is not an error with MATLAB syntax. You are using the mathematics wrong. What you are trying to do means
if 1/c = 1/a + 1/b => c = a + b
does this equation look correct? The correct is
c = a*b/(a+b);
So to correct your equation in MATLAB use,
Rtot= 1./((1-theta)./Ra + (theta./Rb));
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!