Message from Sam Southern - TN in MacGuyver - Skills & Academics #homework-help
so that the function length would track with b and the vector would be that length
and the vector itself would use vector exponent rule of .^ to raise each to the correct power
but it's only giving me the first output instead of all of the outputs
for example, when I input hw1_problem5(2,3), it should output a row vector containing the first 3 powers of 2
so [2 4 8]
but it only gives 
so it's not accepting my length argument somehow
there's another one after that that involves zeroing out part of an array in certain locations, but I'll take any help i can get
shit is so confusing to me
if any other <@&387091385075105804> know how to matlab, I would greatly appreciate the help!
@Sam Southern - TN the second line, `b = length(v);` is changing the value of b
how do I set the length of the vector to b?
@Sam Southern - TN so first I would make a vector of 1..b, I'll call it powers, s
`powers = 1:b`
`v = a.^b`
now it's giving me the last one instead of the first one as the output
instead of 
but not [2 4 8]
hmm I see, I'm at work now will have to check this out in a little while (unless someone else steps in 🙂 )
thanks for trying though, I do appreciate it
The trick I had to remember was that a function that accepts scaler, if you plug in a vector, will return you a vector with the function applied to each entry
that, and making the vector 1...b is `1:b`
just got back from work, happy to see this finally work hahah
Whoever recommended Professor Leonard. Probably the best videos I've found for this. Much appreciated
I was wondering if someone could help me with a problem for my financial mathematics class?
I'll go ahead and post a screenshot of the problem so people could see if they would be able to help.
@Deleted User What's the question? If you drop it here then when someone who can help comes on they can work on it
Here are my notes. The example is supposed to align with how to do the problem, I just can’t seem to get the right answer.