Making a categorical dot plot with indexed variables?

조회 수: 2 (최근 30일)
nines
nines 2022년 6월 6일
댓글: Walter Roberson 2022년 6월 6일
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