Borrar filtros
Borrar filtros

loops in matlab

1 visualización (últimos 30 días)
Durgga Rajendren
Durgga Rajendren el 5 de Abr. de 2011
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 comentario
Jiro Doke
Jiro Doke el 5 de Abr. de 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

Iniciar sesión para comentar.

Respuestas (2)

Matt Fig
Matt Fig el 5 de Abr. de 2011
Show what you have done so far... and where you are stuck.

Sean de Wolski
Sean de Wolski el 19 de Abr. de 2011

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by