loops in matlab
    7 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
Hi there, a matlab question involving the loops.Here is the question:
Electrical resistors are said to be connected in series if the same current passes through each and in parallel if the same voltage is applied across each.
If in series,they are equivalent to a single resistor whose resistance is given by:
R=R1+R2+R3+....+Rn
If in parallel,their equivalent resistance is given by:
1/R =1/R1+1/R2+1/R3+....+1/Rn
a)Write a function  that uses the type of connection and resistances R1 to  Rn as inputs to compute equivalent resistance R
b)Write an M-file that prompts the user to enter the type of connection(series/parallel),hw many individual resistances will b used(n).based on the value of n,program should prompt the user n times to enter the individual resistances R1,R2,......Rn.M-file should then recall function in part a)to get equivalent resistance R.
I badly need help for this part :((
1 commentaire
  Jiro Doke
    
 le 5 Avr 2011
				Hmm, similar homework question as this...
http://www.mathworks.com/matlabcentral/answers/4696-subfunctions-urgent-help-needed
Instead of just pasting questions, please show the work that you have done, and ask *specific* questions. Also read my answer from here. There are a lot of resources to help you get started if you don't know where to start:
http://www.mathworks.com/matlabcentral/answers/4606-how-to-find-sufficient-help-in-matlab-important-matlab-admin
Réponses (2)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



