For loops and vectorisation?
Show older comments
a) Write a script which uses for loops to calculate the resistance of the copper wire at the five lengths. Display the results in two columns, one for the length and one for the resistance
b) Write additional script which uses vectorisation to calculate the resistance of the copper wire at the five lengths
4 Comments
Adam
on 23 Oct 2014
This is Matlab Answers, not the pose a random challenge forum! Why are you telling us to write a script? Most of us are not interested in the resistance of copper wire.
If you have an actual Matlab question something like "I've tried to do this in this way, but this part of it doesn't quite work correctly for this reason..." you will likely get some help here.
Charrizard harrizard
on 23 Oct 2014
I am not sure about part b, but for part a: Assuming that you have a inhomogeneous leader of some length and with some width that depend on x and y. Also assuming that you have a measured voltage from end to end and also have a measured magnetic field at a radius r from the center. The answer would be far too long to write here, but as a hint you use Amperes law to calculate the current. And to Charrizard harrizard: you have assumed that there is a homogeneous wire and DC. It is extremly likely that the wire is homogeneous in both width and materialbut it is not given :). However, the frequency should be given to make an appropriate estimation.
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!