Results 1 to 2 of 2
Like Tree1Thanks
  • 1 Post By chiro

Thread: Vector returned when value is above a certain value

  1. #1
    Newbie
    Joined
    Nov 2014
    From
    sydney
    Posts
    1

    Vector returned when value is above a certain value

    I am trying to figure out what a function or operator should be that when multiplied by a scalar returns a scalar of the same value - when the scalar is above a certain value - and when the value is lower it returns a vector, with component values of a nominated value.

    It's a tricky one..
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    6,572
    Thanks
    1710

    Re: Vector returned when value is above a certain value

    Hey asmodelle.

    What you could do is define a bi-vector that contains a vector component and a scalar component.

    You have a function that sets the vector component and you have a function that returns the scalar component. This is actually done in geometric algebra and the idea goes back to Grassmann who pioneered the subject.

    You could also just define a vector with one more dimension where if the value is 1 you return a vector with a j and k component and if zero you just return the component for the i vector.

    There are a few ways to do this kind of thing.
    Thanks from topsquark
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 0
    Last Post: Dec 3rd 2012, 01:25 PM
  2. Replies: 8
    Last Post: Jan 11th 2011, 10:17 AM
  3. Avoiding having ans returned in a Matlab's function
    Posted in the Math Software Forum
    Replies: 3
    Last Post: Jul 13th 2010, 11:25 PM
  4. Avoiding having ans returned (matlab)
    Posted in the Math Software Forum
    Replies: 2
    Last Post: Oct 27th 2009, 07:47 AM

Search Tags


/mathhelpforum @mathhelpforum