Making a categorical dot plot with indexed variables?

3 次查看(过去 30 天)
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by