# Thread: [SOLVED] Help w/ Matlab

1. ## [SOLVED] Help w/ Matlab

I need help with the following problem in Matlab:

Transistor density can be predicted by d(t) = 30 (2^t/2).
Letting t=0 represent the year 1965 and t=45 represent 2010, use this model to calculate the predicted number of transistors per square inch for the 45years from 1965 to 2010. Let t increase in increments of two years. display the results in a table with two columns - one for the year and one for the number of transistors.

I am in desperate help here so any information would be greatly appreciated!!!!!!!

2. Are you asking someone to write the code for you? If so no one is going to do that.

3. I am just asking for maybe some guidance. I dont expect anyone to do the work for me. If you can provide me with that guidance or help me to further undertand the question i will be glad to accept the help. thanks

4. Well you are going to need to set up a loop that increments by and starts at 1965, but ends at 2010. At each step calculate the density and place that into an array with the corresponding year in a 2d array.

Do you know how to do loops? Do you know how to make an array?

5. i know how to make an array but not a loop. Can you help?

In the for loops they use (this is what you want) they increment by 1. You will need to change that to 2. Your index will look like 1965:2:2010. The part that confuses me about your problem is that you are suppose to calculate every two years, but then you won't calculate the density for 2010 if you start in 1965.

7. you are correct about the problem not ending in 2010 with I am doing incrememnts of 2 starting with 1965. I actually don't know exactly what the professor wants so i am just going to do it until 2009. thank you for your help by the way.

i tried to send you a PM but because i do not have enough posts i was not able to. Send me a PM so i can respond to it instead of "whoring" this post. thanks

8. But that is what this is for. And you never know someone else may have similar questions and would like to see the response.

9. that is true!

I am just very new to Matlab and after reading through many of the posts it appears that a lot of the users have SOME experience while I have none haha.

In all due honesty I don't even know where to begin with this equation
D(t)=30(2^t/2) in matlab or even on paper!

10. Well that equations says the density D is a function of time. More specifically the density varies as $30\cdot(2^{\frac{t}{2}})$. In the problem it said that 1965 is $t=0$. So $D(0) = 30\cdot(2^{\frac{0}{2}}) = 30$ and we see that the density is 30 for 1965. For 1966 $t=1$ and $D(1) = 30\cdot (2^{\frac{1}{2}}) = 30 \sqrt{2}$, so in 1966 the density is $30\sqrt{2}$. Do you understand now?

11. Originally Posted by lvleph
Well that equations says the density D is a function of time. More specifically the density varies as $30\cdot(2^{\frac{t}{2}})$. In the problem it said that 1965 is $t=0$. So $D(0) = 30\cdot(2^{\frac{0}{2}}) = 30$ and we see that the density is 30 for 1965. For 1966 $t=1$ and $D(1) = 30\cdot (2^{\frac{1}{2}}) = 30 \sqrt{2}$, so in 1966 the density is $30\sqrt{2}$. Do you understand now?
so does that make D(2) = 30 * (2^2/2)...D(2)=60? If correct do I have to manually do this for every single year manually or is there a way to input a formula in Matlab so it will do it for you? Thanks again for your help

12. well the loop counter will be t. Then you can just put in the formula 30*(2^(t/2)).

13. I am just afraid to use the loop counter because I have yet to be taught this. Is there a simpler way to do it?

14. There is probably a way, but I don't know it.

15. would you be willing to help me offline to solve this problem? I am willing to pay for your help...i am lost with this problem

Page 1 of 3 123 Last