Making a categorical dot plot with indexed variables?

2 views (last 30 days)
Hello,
I am trying to make a categorical dot plot with 8 components on the x-axis.
I have two categories: 1. a control and 2. stimulus, and then there are four conditions for the control and stimulus (time1, time2, time 3, time4)
I have fed the control and stimulus into a cell:
for i = 1:length(subject_list)
subject=subject_list{i}
control(:,1)=control_with_time % where then control = [1 2 3 4]
stimulus(:,1)=stimulus_with_time % where then stimulus = [2 3 4 5]
% all of above works but scatter plot below doesn't work
scatter([1 2 3 4], [control(i) stimulus(i)]
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

Error in connector.internal.fevalMatlab

Error in connector.internal.fevalJSON
end
I can make the scatter plot for one subject, but I am not sure how to to make it for multiple control/stimulus conditions and feed it into a dot plot.
Here is an example of what I want to do:
Thank you

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!