1

I have number of occurrences of different angles, meaning a vector which is 360 elements long and each element does contains the information how often this angle occurred. I aggregate the data beforehand into 10 categories (otherwise I am running into memory problems) and want to obtain a similar plot as if I would use all categories.

clear all
close all
mydata      = rand(360,1).*100;
cat_size    = 10;
aggreg_sum  = sum(reshape(mydata,cat_size,[]))'; %'

figure
subplot 311
rose(mydata)
set(gca,'View',[-90 90],'YDir','reverse');
title ('all raw data')    

subplot 312
rose(mydata,10)
set(gca,'View',[-90 90],'YDir','reverse');
title ('all raw data summarized in 10 categories')    

subplot 313
rose(aggreg_sum)
set(gca,'View',[-90 90],'YDir','reverse');
title ('aggregated data')    

as the rose plot per se has only so many categories as the vector long is (subplot 1: 360, subplot two 360 but pruned down to 10, subplot 3: 10 upscaled automatically) the plots differ. How can I get subplot 3 to match with 2?

enter image description here

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
horseshoe
  • 1,437
  • 14
  • 42
  • there's a difference if you aggregate into 10 categories or aggregate into a bucket of size 10 (having 36 buckets)... what are you after? – Shai Dec 03 '15 at 11:00
  • @ Shai: What I eventually want is to combine all angles between 0 and 45, 45 and 90 and so on. So the bucket size, to stick with the example above, should be 36 and I want 10 categories/buckets. But I want to aggregate beforehand and later (after several iteration loops) plot them – horseshoe Dec 03 '15 at 11:26
  • @trincot I rolled back your edit because it is very sensible in MATLAB. That single prime *before* the semi-colon is a transpose in MATLAB, the percentage sign denotes a comment and the prime after it is because otherwise SO messes up the MATLAB markdown. Please do not edit code samples in languages you do not speak. – Adriaan Dec 03 '15 at 11:34
  • @trincot I can only reinforce Adriaan's comment. Please be considerate to others and don't edit code you don't speak. Besides, either 1. your edit doesn't make a difference, so it's superfluous, or 2. it makes a difference, but then you're changing relevant code in the question, which you should not do. Please don't do this. – Andras Deak -- Слава Україні Dec 03 '15 at 11:41

0 Answers0