Jeff

75 Reputation

8 Badges

14 years, 94 days

MaplePrimes Activity


These are replies submitted by Jeff

@Carl Love This worked. Thanks.

@mehdi jafari 

For N=4, the matrix would be

( 2 -1  0  0)

(-1  2 -1  0)

( 0 -1  2 -1)

( 0  0 -1  2)

 

For N=8

( 2 -1  0  0  0  0  0  0)

(-1  2 -1  0  0  0  0  0)

( 0 -1  2 -1  0  0  0  0)

( 0  0 -1  2 -1  0  0  0)

( 0  0  0 -1  2 -1  0  0)

( 0  0  0  0 -1  2 -1  0)

( 0  0  0  0  0 -1  2 -1)

( 0  0  0  0  0  0 -1  2)

Yup, I meant a reduction something sorta like that! :D.

I tried all the "Simplification" choices on the menu. I didn't know you could type something like that. Good to go. Thanks.

Yup, I meant a reduction something sorta like that! :D.

I tried all the "Simplification" choices on the menu. I didn't know you could type something like that. Good to go. Thanks.

Well, you used the wrong A. :D  But the rest of it is just what I needed, so I forgive you.

Thanks.

J

Well, you used the wrong A. :D  But the rest of it is just what I needed, so I forgive you.

Thanks.

J

OK, let me try this posting again so it's more readable (just so you know, that last post looked fine when I previewed it):

 

Student here. I'm having a real hard time with Maple's help. Can someone tell me how to create F, without having to type the whole thing in (like I just did) each time I change N. F is really just columns of omega raised to the (column-1)*(row-1) power

I also need help with the syntax for pulling out a column of F, and multiplying A (an NxN matrix) by that column, A*F(column n).

 

>restart; with(LinearAlgebra); N := 8;

>omega := proc (N) options operator, arrow; exp(-(2*I)*Pi/N) end proc

>F := Matrix(8, 8, {(1, 1) = 1, (1, 2) = 1, (1, 3) = 1, (1, 4) = 1, (1, 5) = 1, (1, 6) = 1, (1, 7) = 1, (1, 8) = 1, (2, 1) = 1, (2, 2) = omega, (2, 3) = omega^2, (2, 4) = omega^3, (2, 5) = omega^4, (2, 6) = omega^5, (2, 7) = omega^6, (2, 8) = omega^7, (3, 1) = 1, (3, 2) = omega^2, (3, 3) = omega^4, (3, 4) = omega^6, (3, 5) = omega^8, (3, 6) = omega^10, (3, 7) = omega^12, (3, 8) = omega^14, (4, 1) = 1, (4, 2) = omega^3, (4, 3) = omega^6, (4, 4) = omega^9, (4, 5) = omega^12, (4, 6) = omega^15, (4, 7) = omega^18, (4, 8) = omega^21, (5, 1) = 1, (5, 2) = omega^4, (5, 3) = omega^8, (5, 4) = omega^12, (5, 5) = omega^16, (5, 6) = omega^20, (5, 7) = omega^24, (5, 8) = omega^28, (6, 1) = 1, (6, 2) = omega^5, (6, 3) = omega^10, (6, 4) = omega^15, (6, 5) = omega^20, (6, 6) = omega^25, (6, 7) = omega^30, (6, 8) = omega^35, (7, 1) = 1, (7, 2) = omega^6, (7, 3) = omega^12, (7, 4) = omega^18, (7, 5) = omega^24, (7, 6) = omega^30, (7, 7) = omega^36, (7, 8) = omega^42, (8, 1) = 1, (8, 2) = omega^7, (8, 3) = omega^14, (8, 4) = omega^21, (8, 5) = omega^28, (8, 6) = omega^35, (8, 7) = omega^42, (8, 8) = omega^49})

 

I am using Maple 14 in worksheet mode.

Thanks,

J

Oops! Thanks.

Oops! Thanks.

I see. OK, thanks for the info.

I see. OK, thanks for the info.

First, I made a typo in my first post. The command I'm issuing is:

>solve(x+y+sqrt(x^2+y^2=24,y)

 

trace seems like it is for debugging code. I can't quite get it working right yet (I tried trace(solve(x+y+sqrt(x^2+y^2=24,y))), so I'm not sure.

I may have misunderstood the tip. I'm actually looking for something that will show the math steps Maple took to solve a problem. I want to see the math steps, as though I were making a document to show students how to do it. Maybe that function doesn't exist.

Works perfectly. Nicely done.

I don't follow all the details of your explanation, so one day I will return and try to dig into it more. In the meantime, my hwk is due in a few days and now I can experiment with varying the number of steps. Thanks.

Works perfectly. Nicely done.

I don't follow all the details of your explanation, so one day I will return and try to dig into it more. In the meantime, my hwk is due in a few days and now I can experiment with varying the number of steps. Thanks.

Now how can I write a loop to create S, the piecewise function, if I have 40 pieces created (for a school porject) just the way you showed in the j loop?

My numerical analysis project includes creating an algorithm for a cubic spline (I cannot use any bulit in cubic spline functions). I created it as you suggested it, and created the piecewise part using cut and paste and manually update the indexes. In other words, I typed this (the function names have changed):

for i from 0 to N-1 do

v[i] := expand(a[i]+b[i]*(T-t[i])+c[i]*(T-t[i])^2+d[i]*(T-t[i])^3)

end do

V := piecewise(

t[0]<=T<=t[1],v[0],

t[1]<=T<=t[2],v[1],

...

t[39] <= T and T <= t[40], v[39]):

I wonder if their isn't an easier way.

 

Thanks. :D

1 2 Page 1 of 2