# how to find the equivalent resistance of two resistors in parallel and series

39 vues (au cours des 30 derniers jours)
Kartickeyan V le 18 Juil 2017
Modifié(e) : Andrei Bobrov le 18 Juil 2017
help me finding the equivalent resistance of two resistors for example r1 and r2 in parallel and series
clc;
clear all;
r1=1200;
r2=1000;
rt=parallel(r1,r2);
display('rt')
when i run this code i am getting either answer ams as 1 or some error
##### 1 commentaireAfficher AucuneMasquer Aucune
Stephen23 le 18 Juil 2017
What is parallel ?

Connectez-vous pour commenter.

### Réponses (2)

dbmn le 18 Juil 2017
parallel might not be the best function to use here. See more in the documentation (which is what you should do everytime you use a function either by typing help parallel or doc parallel)
sys = parallel(sys1,sys2)
% Which needs sys, sys1 and sys2 in a state space notation to work
but why bother writing these in that special state space notation when you can simply use Wikipedia and Google
rt = r1*r2 / (r1+r2);
##### 0 commentairesAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens

Connectez-vous pour commenter.

Andrei Bobrov le 18 Juil 2017
Modifié(e) : Andrei Bobrov le 18 Juil 2017
r1=1200;
r2=1000;
parallel = @(r1,r2)1/sum(1./[r1,r2]); % or: parallel = @(r1,r2)prod([r1,r2])/sum([r1,r2]);
rt=parallel(r1,r2)
##### 0 commentairesAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Time Series Events dans Help Center et File Exchange

### Community Treasure Hunt

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

Start Hunting!