From: Walter Roberson on
Muhamad wrote:

> oke,, i will insert a number to this equation
>
> sin(A) - sin (16.62)e^-(180+A-16.62)/18.85
> we must find a result for A with use newthon raphson,,

Careful, there are two solutions.

Other than that, it appears to be a normal application of Newton-Raphson,
which has been discussed here a number of times before. I presume that your
text or course notes outlines the method; what do you have so far in
translating the method into Matlab ?
From: Muhamad on
Walter Roberson <roberson(a)hushmail.com> wrote in message <hpl9do$sai$1(a)canopus.cc.umanitoba.ca>...
> Muhamad wrote:
>
> > oke,, i will insert a number to this equation
> >
> > sin(A) - sin (16.62)e^-(180+A-16.62)/18.85
> > we must find a result for A with use newthon raphson,,
>
> Careful, there are two solutions.
>
> Other than that, it appears to be a normal application of Newton-Raphson,
> which has been discussed here a number of times before. I presume that your
> text or course notes outlines the method; what do you have so far in
> translating the method into Matlab ?

can you help me with program's listing ? i still confused
From: Muhamad on
James Allison <james.allison(a)mathworks.com> wrote in message <hpl8mc$2pd$1(a)fred.mathworks.com>...
> Some tips for your assignment:
>
> You will need a while loop and two functions - one for the function you
> are finding the zero of, and one for its derivative. I assume you
> already have the formula:
>
> http://en.wikipedia.org/wiki/Newton%27s_method
>
> -James

i know it, i just have make a notes for it, but i am still confused to run it with matlab because i newbie for matlab, can you help me with program's listing, please.
From: Walter Roberson on
Muhamad wrote:
> Walter Roberson <roberson(a)hushmail.com> wrote in message
> <hpl9do$sai$1(a)canopus.cc.umanitoba.ca>...

>> Other than that, it appears to be a normal application of
>> Newton-Raphson, which has been discussed here a number of times
>> before. I presume that your text or course notes outlines the method;
>> what do you have so far in translating the method into Matlab ?

> can you help me with program's listing ? i still confused

I presume that your text or course notes outlines the method; what are some
particular parts you are having difficulty translating into Matlab? Have you
read the Getting Started section of the Matlab documentation (press F1 to
bring up the documentation) ? Do you have previous computer programming
experience? If so then it might help to write it in your more familiar
computer language first, and then translate step by step into Matlab.

We answer specific Matlab questions, but we do not do people's assignments for
them.
From: Muhamad on

> I presume that your text or course notes outlines the method; what are some
> particular parts you are having difficulty translating into Matlab? Have you
> read the Getting Started section of the Matlab documentation (press F1 to
> bring up the documentation) ? Do you have previous computer programming
> experience? If so then it might help to write it in your more familiar
> computer language first, and then translate step by step into Matlab.
>
> We answer specific Matlab questions, but we do not do people's assignments for
> them.

oke, i am still learning for this and i make something trial but it error can you help me

this is my listing

% Newton_Raphson.m
clear;
x = input('Nilai Awal :');
teta = input('Nilai Teta : ')
W = input('Nilai Omega(W) : ')
R = input('Nilai R : ')
C = input('Nilai C : ')

tolerance = 0.0001;
iterations = 0;
while (iterations<30) & (abs(func(x))>tolerance)
x = x-func(x)/func_prime(x);
iterations = iterations+1;
end

if iterations==30
disp('No root found')
else
disp([' Root = ' num2str(x,10) ' found in ' int2str(iterations) ' iterations.'])
end

-----------------------------------------------------------------------------------------------------------

%func_prime.m

function [value] = func_prime(x)
value = sin(A)-(sin(teta)*e^(-(180+A-teta)/WRC);

x = 1;

for j = 1:10
x = x - func(x)/func_prime(x);
end

----------------------------------------------------------------------------------------------------------

%func.m

function[f] = func(x)
f = cos(A)-sin(teta)*e^(-(180+A-teta)/WRC);

paramnames =['A'];

---------------------------------------------------------------------------------------------------------

if you find a problem in my program please help me,,thank you
First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: edge linking problem
Next: Numerical Newton Rapshon