Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Calculating a function
Replies: 6   Last Post: Mar 5, 2014 6:01 PM

 Search Thread: Advanced Search

 Messages: [ Previous | Next ]
 Derek Goring Posts: 3,922 Registered: 12/7/04
Re: Calculating a function
Posted: Mar 5, 2014 5:06 PM
 Plain Text Reply

On Thursday, March 6, 2014 10:54:07 AM UTC+13, canon wrote:
> > Did you even read Tideman's answer ?
>
> > If instead of
>
> > > > x=linspace(a,b,nx); % nx is the no of points in x
>
> > > > y=linspace(c,d,ny); % ny is the no of points in y
>
> > you write
>
> > x=[2, 4, 5, 9];
>
> > y=[1, 2, 4, 8];
>
> > you are done.
>
> >
>
> > Best wishes
>
> > Torsten.
>
>
>
> Thanks, Assuming each x and y value has its own f(x) and f(y) and I am looking for the function (z=f(x,y), f(x)*f(y)). That is it has 2 dimension, one is f(x,y) and another one is f(x)*f(y) for each pair of x and y. How can I figure it out?
>
>
>
> Thanks

So the function f(x,y) must be different to f(x) and f(y), correct?
So, how about:
x=[2 4 5 9]'; % Make them column vectors
y=[1 2 4 8]';
z=[function_xy(x,y) function_x(x).*function_y(y)];

This will produce a matrix z(4,2) (assuming the functions produce column vectors).

Date Subject Author
3/4/14 canon
3/4/14 Derek Goring
3/4/14 canon
3/5/14 Torsten
3/5/14 canon
3/5/14 Derek Goring
3/5/14 canon

© The Math Forum at NCTM 1994-2018. All Rights Reserved.