フィルターのクリア

Making a categorical dot plot with indexed variables?

1 回表示 (過去 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
  1 件のコメント
Walter Roberson
Walter Roberson 2022 年 6 月 6 日
missing ) on the scatter call

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by