I'm trying to transform area values into raster data.(adsbygoogle = window.adsbygoogle || []).push({});

I have areas, defined as circles (location of center + length of radius). Each area has a designated value between 0 and 2. I used Matlab's commandareato plot the areas and also to designate the value that goes with each area. Now I want to transport this into raster data so I can plot it usingpcolor.

When my areas were squares, I could simply type this:

Net(-1*(Loc(1,2)-50)/10*L+1:-1*(Loc(1,2)-50)/10*L+L/2^2+1, (Loc(1,1)+82)/10*L+1:(Loc(1,1)+82)/10*L +L/2^2+1) = Data3(1,2);

The pixels in Net were designated with the value from Data3 but there should be a more elegant way to do this with Matlab, I just don't know what it is.

Any suggestions?

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matlab - area values into raster data

**Physics Forums | Science Articles, Homework Help, Discussion**