Recent content by phynewb

  1. P

    Linear Equation Solutions: A Systematic Approach for n1xn2 and n1xm2 Matrices

    Thanks AlephZero and HallsofIvy. I guess the example is too simple. I like to consider the general case. Here is the way I solve it. Want to solve C with AC=B. Multiply A^t on both sides A^t.A.C=A^t.B Now A^t.A^t is a square matrix so I can calculate its inverse (if it is not singular)...
  2. P

    Linear Equation Solutions: A Systematic Approach for n1xn2 and n1xm2 Matrices

    Hi guys I wonder if you know any linear algebra formalism or something to solve the following question systematically? Give A,B with A=n1xn2 matrix and B=n1xm2 matrix. How do we get C=n2xm2 matrix such that A*C=B. A simple example if A=(1,2)^t, B=(2,4)^t, then C=2 The question is how to...
  3. P

    Are There Criteria for Proving Co-Primes of Vectors?

    I type the wrong vectors. I consider the two (-1,0,3,-1) and (-3,1,1,0). Are they coprime? I think you are right but I do not know how to prove it. Thank you!
  4. P

    Are There Criteria for Proving Co-Primes of Vectors?

    Thanks Norwegian! I think you are almost right. But (4,-3) and (3,-4) are coprime but with det=7 will be a counter example. If we consider higher dimensions, are (2,-1,2,-1) and (-4,1,4,-1) co-prime? Do you know how to show it rigorously?
  5. P

    Are There Criteria for Proving Co-Primes of Vectors?

    Hi guys I have a question about the coprime of two vectors For two vectors (x1,x2) and (y1,y2). Given a,b with gcf (a,b)=1 .i.e. relatively prime. I do the linear combination of two vectors a(x1,x2)+b(y1,y2)=n(z1,z2) with some common factor n and gcf(z1,z2)=1. If n=1 for any a,b, two...
  6. P

    Are these two vectors coprime?

    Hi guys I have a question about the coprime of two vectors For two vectors (x1,x2) and (y1,y2). Given a,b with gcf (a,b)=1 .i.e. relatively prime. I do the linear combination of two vectors a(x1,x2)+b(y1,y2)=n(z1,z2) with some common factor n and gcf(z1,z2)=1. If n=1 for any a,b, two...
  7. P

    Matrix as an output of a function

    Thanks a-tom-ic. Say, f1(E),f2(E),f3(E) are three functions. Here E is real number and the outputs are nxn real matrices. Define F(E)=f1(E)*f2(E)*f3(E). So E is also an number and output is a matrix. The purpose is to calculate the integration of F(E)(a,b) over E from E0 to E1. Here...
  8. P

    Matrix as an output of a function

    But here comes the other question. I need to integrate test(E)(1,3): int(test(E)(1,3),E1,E2). If I set x=test(E), then int(x,E1,E2) will be problematic as shown "Undefined function or variable 'E'. Is any way to solve this problem? Thank you for help.
  9. P

    Matrix as an output of a function

    Thank you a-tom-ic. So I need other space to save the matrix first.
  10. P

    Matrix as an output of a function

    Hi guys I am new to matlab. I have a question in how to pick up matrix elements as a output of a function. function result=test(E) result=[1,2,3;4,5,6]*E; For each E, test(E) will generate a 2x3 matrix. I wonder how to pick up the matrix element,say test(2)(1,3). When I type...
  11. P

    Fortran Debugging Strange Fortran Code: A Simple Delta Function

    Thanks Mark44. It really works! I am always troubled by this accuracy stuff... Thank you a lot :p
  12. P

    Fortran Debugging Strange Fortran Code: A Simple Delta Function

    It shows -10 31.830990148286446 -9 4.42379935910539249E-054 -8 3.96072696157977595E-306 -7 31.830990148286446 -6 4.42379936653263965E-054 -5 0.0000000000000000 -4 31.830990148286446 -3...
  13. P

    Fortran Debugging Strange Fortran Code: A Simple Delta Function

    Hi guys, I just wrote a simple code for delta function and print it out. Here it is. program main implicit none integer i real*8 del real*8,parameter:: ep=1D-2 real*8,parameter:: pi=3.1415926 do i=-10,10,1 write(*,*)...
Back
Top