Asked by Zach White
on 29 Mar 2013

the code is as follows. I need to separate each record (r1 stands for record 1 and so on) into graphs containing A1 data and A2 data for each and then as a whole once the preliminary graphs are completed. The axes need to be # of crabs on the y axis and Antennae 1 and Antennae 2 on the X in a bar graph format. I jut need a walk through of how to do this once and then I will be able to figure things outs once this kind of information arises again.

idx_r1_A1 = find ( ant_num_r1 == 1 ); idx_r1_A2 = find ( ant_num_r1 == 2 );

idx_r2_A1 = find ( ant_num_r2 == 1 ); idx_r2_A2 = find ( ant_num_r2 == 2 );

idx_r3_A1 = find ( ant_num_r3 == 1 ); idx_r3_A2 = find ( ant_num_r3 == 2 );

idx_r4_A1 = find ( ant_num_r4 == 1 ); idx_r4_A2 = find ( ant_num_r4 == 2 );

% ___

fig_landscape

% ___

subplot (211)

hold on plot ( time_r1 (idx_r1_A1), tag_num_r1 (idx_r1_A1), 'b+') plot ( time_r1 (idx_r1_A2), tag_num_r1 (idx_r1_A2), 'bo') l1 = legend ('Ramp A1', 'Ramp A2'); set (l1, 'Box', 'off');

plot ( time_r2 (idx_r2_A1), tag_num_r2 (idx_r2_A1), 'b+') plot ( time_r2 (idx_r2_A2), tag_num_r2 (idx_r2_A2), 'bo')

dateaxis ('x', 6);

xlabel ('Time (MM/DD)'); ylabel ('RFID tag number');

set (gca, 'YLim', [300 800]);

% ___

subplot (212)

hold on plot ( time_r3 (idx_r3_A1), tag_num_r3 (idx_r3_A1), 'mx') plot ( time_r3 (idx_r3_A2), tag_num_r3 (idx_r3_A2), 'mo') l1 = legend ('Ramp A1', 'Ramp A2'); set (l1, 'Box', 'off');

plot ( time_r4 (idx_r4_A1), tag_num_r4 (idx_r4_A1), 'mx') plot ( time_r4 (idx_r4_A2), tag_num_r4 (idx_r4_A2), 'mo')

dateaxis ('x', 6);

xlabel ('Time (MM/DD)'); ylabel ('RFID tag number');

set (gca, 'YLim', [300 800]);

*No products are associated with this question.*

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply Today
## 2 Comments

## Walter Roberson (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/69057#comment_139725

Someone walked you through a bunch of the code in response to an earlier question, http://www.mathworks.co.uk/matlabcentral/answers/68770-i-need-help-interpreting-what-this-means-could-you-give-me-detail-to-what-this-means-i-need-to-be

## Walter Roberson (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/69057#comment_139726

Isn't this question just a clarification of http://www.mathworks.co.uk/matlabcentral/answers/69015-would-anyone-be-able-to-help-walk-me-through-making-graphs-from-a-file-i-need-to-make-some-graphs-f ?