Recent content by Moly

  1. M

    Newton for a 4x4 system of nonlinear eqns

    Hi All. I think i figured it out... i am attaching the program below for a linear set of eqns... that was just to verify that all is working well... however, i was told that the method should converge in one iteration for a linear system, and for me it happens in 3.. am i doing something wrong...
  2. M

    MATLAB Setting up Newton Raphson integral with matlab

    Thanks Gib. I figured where i went wrong.. i still have a question that i will post later today
  3. M

    MATLAB How can I use MATLAB to solve double integrals?

    Now, this is giving me the corrrect answer but not sure if i cheated in a way or not... what do you think: close all clear all x0=0; xt=1; xstep=110; dx=1/(xstep-1); y0=0; yt=1; ystep=110; dy=1/(ystep-1); sum2=0; for i1=1:ystep+1 sum1=0; y=(i1-1)*dy; x2step=floor(y/dx)...
  4. M

    MATLAB How can I use MATLAB to solve double integrals?

    oh... forgot to say that I am using trapazoidal rule for the integration
  5. M

    MATLAB How can I use MATLAB to solve double integrals?

    the program that i put together is giving me the integral=24.8427 and the answer is actually 0.316... my program is copied below, what am i doing wrong: x0=0; xt=1; xstep=11; dx=1/(xstep-1); y0=0; yt=1; ystep=11; dy=1/(ystep-1); sum2=0; for i1=1:xstep sum1=0; y=(i1-1)*dy...
  6. M

    MATLAB How can I use MATLAB to solve double integrals?

    Hi Everyone. I would like to integrate the following using matlab: \int_0^1 ~\int_0^x e^{-x^2} ~dy ~dx looks pretty simple but don't know how to set up the embedded for loops for the integral with in the integral especially that the upper limit of the inner integral is x and not a number...
  7. M

    Newton for a 4x4 system of nonlinear eqns

    Hi All. Can somebody give me a sample MATLAB code for Newton-Raphson Method for Nonlinear 4x4 System of Equations. I'm trying to set a very ugly one up and haven't seen NR before the beginning of this week. I've figured the NR for a single eqn but this is driving me nuts.
  8. M

    MATLAB Setting up Newton Raphson integral with matlab

    Hi All. I have an equation that i want to numerically find the root of by using Newton Raphson. However the equation involves an integral which i am using the trapazoidal rule to evaluate. And here is the simplified version of it: 1 = e^{-cy} \int_0^1 e^{-y(1-x)} dx So i am supposed...
  9. M

    Undergrad Find fyy (x,y): Partial Derivative of x2y3 + x4y + xe2y

    Try this: replace every x with the constant a... now the equation should look like it is in one variable, y. So what you need now is to find the second derivative with respect to y. Does that make life easier?
  10. M

    Fortran Beginner fortraner: messing up arithmatic

    Thanks a lot Borek. I changed Xstep and Nstep from integers to real and now the calculations come out right. I am sure i will have another silly question in a few minutes and your help is muuuuuuuuuuuuuuuuuuuuuuuuuuuuch appreciated
  11. M

    Fortran Beginner fortraner: messing up arithmatic

    Hi All. I am trying to rewrite a program that i have in MATLAB to one in fortran. as i chug along, i am comparing the results and i am getting funny answers. This is the program in have in fortran so far: ccccccccccccccccccccccccccccccccccccccccccccccccc program main implicit...
  12. M

    MATLAB Matlab: Change Number Format to Remove Decimals

    Thank you for your reply. i tried the first few before posting my question and could not really figure it out. any advice as to which specific option to use?
  13. M

    Fortran Beginner fortran question - starting with a new slate

    Thanks for the prompt reply Borek. I am glad I asked instead of banging my head against the screen until next week. Thanks again.
  14. M

    MATLAB Matlab: Change Number Format to Remove Decimals

    Hi All Matlab is displaying numbers with 4 decimal places and i hate when it does that for whole numbers. for example i have a matrix C(i) that starts off from 1 down to 150/275. When i multiply it by 275 i get the first entry as 275.0000 and the last as 150.0000 how do i turn that off or...