Scalar Field + Scatter Plot = Save as new Scalar Field with original Dimension

Discussion in 'MATLAB' started by Andres Godoy, Oct 2, 2010.

  1. Andres Godoy

    Andres Godoy Guest


    Im creating a Scalar Field:

    Map = zeros( 1024, 1280 );

    I also have two vectors which I want to scatter:

    scatter( x, y, [100], 'filled', 'w');

    I can create an image which shows my black scalar field + my white scatter dots on top with:

    imshow( Map );
    hold on;
    scatter( x, y, [100], 'filled', 'w');

    My question then is: how can I add the results of the scatter, ie: each x,y point would be a white [1 1 1] point onto the Map scalar field? Or said differently. How can I make this resulting figure of a black background with my white dots on top into a 1024 x 1280 scalar field which contains only 1's and 0's? Thank you and I appreciate the help!!!!

    Andres Godoy, Oct 2, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.