DragonKnight
Member
If you evaluate (1+1/sigma) = 2.0526 in the last integral, you can get a plot. (no guaranty it's correct.)
Thanks for the suggestions but unfortunately still having the same problem lol
If you evaluate (1+1/sigma) = 2.0526 in the last integral, you can get a plot. (no guaranty it's correct.)
Thanks for the suggestions but unfortunately still having the same problem lol
y=constant*int(1/(x^2.0526)*Jc);
matlab 2015b
Thank you! The (x^2.0526 * Jc) term should be in the denominator it looks like your missing parenthesis to dictate that. Do you mind adding them and letting me know if your still able to plot a graph? Thanks again
fun=@(x)constant./(x.^2.0526.*a.*exp(-b.*x));
y=integral(fun, Co,Cf);
y=3.4911
Thank you! The (x^2.0526 * Jc) term should be in the denominator it looks like your missing parenthesis to dictate that. Do you mind adding them and letting me know if your still able to plot a graph? Thanks again
Try this? I'm still not sure what the problem you're solving is about (it looks poorly worded to me), so I hope the lower bound 0.5 that I used below is correct. I also wonder what Cf is used for.
syms x C;
% Define a, b, Co, Cf, A, Vo, sigma as before
a = 50; b = 0.02;
Co = 0.5; Cf = 50;
A = 19.4;
Vo = 3255;
sigma = 0.95;
% Define J(C) and the constant
Jc = a * exp(-b*x);
constant = Vo / (sigma * A) * Co^(1/sigma);
% Evaluate t = t(C)
t = constant * int(1 / (Jc * x^(1 + 1/sigma)), x, 0.5, C);
% Plot t = t(C)
ezplot(t, 0.5, 50);
Wow great that worked! Thank you! Co is the initial concentration and Cf is the final concentration and also the limits for the integral. My goal is to plot concentration vs time, so I am assuming I do not plug in the limits because then I will just get a number (which is not what I want to plot). Your code is working for me however could you please explain what ",x, 0.5, C)" means at the end of the equation. From what I know I thought it was to just define your limits. How come we only put the lower limit? Also you used C can you explain where that comes from?
Thanks!
Sure. The second input, x, tells Matlab this is the variable that the integral is performed over. I used x as a dummy variable.
The two inputs that follow afterwards are the bounds of the integral. We are asking Matlab to integrate the expression from 0.5 to C. Note that I had earlier defined C to be a symbolic variable. Hence, the variable t isn't assigned a value yet, but is a function of C now.
Finally, the ezplot routine graphs the function t = t(C) from concentration level of 0.5 to 50.
The way you described the problem, though, it sounds like you might want to plot the concentration on y-axis and time on x-axis (may be more useful). I'd use the plot routine to have greater control over plotting, but this will require a little more work. At the very least, please use the title, xlabel, and ylabel routines to indicate what we are seeing on the graph.
I studied engineering years ago so did some high enough level maths but I've totally forgotten everything I ever knew. I'd be interested in having a look again at stuff like calculus, series, linear optimisation, so would anyone know of any decent resources for someone like me? A book would be ideal.
Does anyone know how to change t (x) to x (t) in matlab?
in other words how I make t = constant * int(1 / (Jc * x^(1 + 1/sigma)) to c= ???
x/2 + (x-2)/(x+1) ≤ 1
Subtract 1 to get it to = 0
x/2 + (x-2)/(x+1) - 1 ≤ 0
I'm trying to solve this inequality by using the graph but I'm lost on where to even start I think.
And now I'm lost.
The graph that it gives me is this:![]()
If, as you say, you are supposed to solve this by using the graph, then you are almost finished. You are interested in the parts of the graph where the y-values are less than or equal to zero. The solution will be the x-values of those sections.I'm trying to solve this inequality by using the graph but I'm lost on where to even start I think.
And now I'm lost.
The graph that it gives me is this:![]()
Try multiplying by two to get rid of the fraction. Then multiply the equation out and combine like terms.
Edit: My bad, didn't see the fraction bar. In that case, combine the two fractions.
I've been given a problem on collision. Each vehicle moves at an initial speed of 9 m/s, they go into collision. Each driver has a mas of 60 kg. Including the drivers, the total mass for the car is 860 kg and the total mass for the truck is 4060 kg. The collision time is at 0.140 s.
I just need help on part i-l, I'm not sure what to do at this point. Here
At the moment of the collision, each driver has a velocity, and shortly after the collision, you can assume that they have zero velocity (if the seatbelts worked!). So, there's been an impulse that pushed a driver from moving to completely still.
Does that help?
Makes sense. How would I calculate the impulse of it for both the car and the truck?
It's been forever since I've done partial derivatives. Could someone help with this?
I have this partial derivative dA(z)/dg2
A(z) = 1 - sum(a[k]*z^-k), k = 1 -> 2 or A(z) = 1 - a[1]*z^-1 - a[2]*z^-2
g2 = -a[1] / (1 + a[2])
I don't really know where to start with this...
Not really sure this goes here, but I'll give it a try. I'm thinking of the following problem: you have a random number, and you want to reach that number by adding the same number several times, starting on 1.
So let's say 251 (prime). One way to do this would be, start with 1, sum until 5 (that would be 4 operations). Then you take that 5 and get, idk, 25 (another 4 operations), afterwards you take 25, "multiply" it with 10 (9 ops) and finally you add 1 (1 op). So, the process "costs" 4 + 4 + 9 + 1 = 18 operations with this chain.
I want to know if this problem has a name, and in that case, if an algorithm to minimize operations exists.
My reason is basically copy and paste, suppose you want to copy a word X number of times, what would be the most "efficient" way to do it.
Thanks!
Yes, that's more or less what I was thinking, only you can't add any number less or equal (well, maybe you can but my point is it can be difficult). My problem comes from the last difference. Instead of an number example I'll just go with copy-pasting words.It's not clear but I think you're saying that you start with 1 and can add any number less than or equal to what you've got, and you're trying to reach some target with as few additions as possible.
The fastest you can reach any power of two will be to just double your number repeatedly. For targets that are not powers of two you go to the greatest power of two less than the target and then add the difference.
Not really sure this goes here, but I'll give it a try. I'm thinking of the following problem: you have a random number, and you want to reach that number by adding the same number several times, starting on 1.
So let's say 251 (prime). One way to do this would be, start with 1, sum until 5 (that would be 4 operations). Then you take that 5 and get, idk, 25 (another 4 operations), afterwards you take 25, "multiply" it with 10 (9 ops) and finally you add 1 (1 op). So, the process "costs" 4 + 4 + 9 + 1 = 18 operations with this chain.
I want to know if this problem has a name, and in that case, if an algorithm to minimize operations exists.
My reason is basically copy and paste, suppose you want to copy a word X number of times, what would be the most "efficient" way to do it.
Thanks!
Let x = floor( log2(N)) -1 , the number of operations = x + sum ( digits of N in binary) . In your example, N = 251 = 0b1111 1101, number of operations = 6+7 = 13. Basically, you do ((1+a_1)*2+a_2)*2... a_n is the binary digit at n-th position.
How to prove it's minimal though...
This will be the fastest way to construct a number if you can only ever double your number or add 1. But it's not the fastest if you can also multiply your number by some factor k (at a cost k-1 rather than at a cost 1).
For example, suppose your target is of the form 2^n - 1, where n is large and even. That is, the target's binary representation is a long, even-length string of 1s. Then your method constructs the number in I believe 2n steps (I think you're counting the initial 1 as a step). But with only about 1.5n steps we can construct the alternating string 101010101...01, which we can multiply by 3 to obtain the target.
I got up the nerve to ask my instructor and turns out he made a mistake on his slides.Trying to compare the variances of some estimators, but I'm confused by my teacher's steps. The estimators come from an exponential distribution.
![]()
I get the variance of the first estimator. What I don't understand is why adding var(x1 + x2) is equal to 2 theta instead of 2 theta squared. Didn't we just prove that var(x1) = 2 theta squared? Am I forgetting something in adding variances that makes the square go away?
I don't remember much about matrices, but if A^-1 is 2x2 and B is 1xn, how can you multiply them? Unless you transform the message so it fits a (n/2)x2 matrix.anybody good with cryptography?
There is 4 Different city in a state (City A, City B, City C, City D). The Governor decide to chose 4 people from each city. The person that he pick will represent 4 ethnic group. Namely White, African, Asian, and Hispanic, of the said city.
From this 16 people, The governor then divide them into 4 groups of 4. The group must consist 4 people from different city and same 4 people must come from different ethnic group.
How many combination of group that The Governor can make?
So i got Story Problem
If I'm not mistaken, your problem is equivalent to counting Latin squares where rows = "city", columns = "ethnicity", and symbols are group labels.
There are 576 4x4 Latin squares. We don't care about the labels for the groups so we divide by the number of permutations of group labels. The answer is 576/4! = 24.
Thanks you very much. I did brute force and got 24 as answer. But not sure how to do it mathematically
Anyway to know all possible combination?
i think i got the answer right
but when i enter it into the webassign system it says its wrong
so i just want to make sure whether or not i done goofed
You can make the maximum even larger and the minimum even smaller by choosing the right combinations: 8(+2) - 4(-1) = 20, and 8(-2) - 4(+1) = -20.
In your work, you wrote,
x^2 + x^2/4 = 5
then,
4x^2 + x^2 = 5.
The RHS should be 20 (which you did write later).
I'm not great at writing proofs, so if anyone can tell me how to improve this, or if there's a better approach, it'd be much appreciated.Every night that a picture of the thief isn't taken, you'll know whether or not the theft happened by the presence of the newspaper in the photo.
Therefore, the first night start at time [(3+7)/2 =] 5. Lets set x0 = 5.
If the newspaper is still there, then we know the theft occurs between 5 and 7.
If the newspaper is not there, then we know the theft occurs between 3 and 5.
Whatever the outcome, have the next photo taken at (x0 + y0)/2, where y0 is dependent on whether or not the newspaper is there. This will be x1.
Generally, we get xN = ( xN-1 + yN ) / 2, where yN is the other value that is not x0 within the time frame we know the theft occurs in.
We will have a photo of the thief by x3 at most, thus it will take at most 4 nights before a photo of the thief is taken.
Okay GAF, I'm studying for a Numerical Analysis final and on one of the practice finals, this question comes up
[/IMG]http://i.imgur.com/4lRG5ou.png[/IMG]
Here's my shot at it:
I'm not great at writing proofs, so if anyone can tell me how to improve this, or if there's a better approach, it'd be much appreciated.