Filter löschen
Filter löschen

Active cell number of 4 individuals by days

2 Ansichten (letzte 30 Tage)
Yan
Yan am 18 Apr. 2024
Kommentiert: Yan am 18 Apr. 2024
mouse ID FE1 FE2 FE3 NE1 NE2 NE3 NE4 NE5 NE6 NE7 NE8 NE9 NE10 NENE1 20230908 391 439 415 453 486 405 450 445 386 356 392 395 376 354 20230910 247 176 181 227 173 194 223 193 183 83 193 101 175 149 20231004A 280 390 377 215 272 261 328 321 232 390 351 398 374 302 20231004B 195 176 183 247 240 171 148 174 165 159 186 128 130 119
  4 Kommentare
Manikanta Aditya
Manikanta Aditya am 18 Apr. 2024
% Assuming the data is in a matrix 'data' of size 4x14 (4 mice, 14 days)
% with each row corresponding to a mouse and each column to a day
% Calculate the mean and SEM
mean_values = mean(data, 1);
sem_values = std(data, 0, 1) / sqrt(size(data, 1));
% Create a vector for the days
days = 1:size(data, 2);
% Plot the mean values with error bars for the SEM
errorbar(days, mean_values, sem_values);
xlabel('Day');
ylabel('Mean Active Cell Number');
title('Mean and SEM of Active Cell Numbers Across Days');
Check this example script.
Yan
Yan am 18 Apr. 2024
Thank you so much!! That's really what I need.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Manikanta Aditya
Manikanta Aditya am 18 Apr. 2024
Hi,
Check this example script:
% Assuming the data is in a matrix 'data' of size 4x14 (4 mice, 14 days)
% with each row corresponding to a mouse and each column to a day
% Calculate the mean and SEM
mean_values = mean(data, 1);
sem_values = std(data, 0, 1) / sqrt(size(data, 1));
% Create a vector for the days
days = 1:size(data, 2);
% Plot the mean values with error bars for the SEM
errorbar(days, mean_values, sem_values);
xlabel('Day');
ylabel('Mean Active Cell Number');
title('Mean and SEM of Active Cell Numbers Across Days');
This script assumes that your data is organized in a 2D matrix where each row corresponds to a mouse and each column corresponds to a day. The mean function calculates the mean value for each day (column), and the std function calculates the standard deviation for each day, which is then divided by the square root of the number of mice to get the SEM. The errorbar function is used to plot the mean values with error bars representing the SEM.
Hope this helps.

Kategorien

Mehr zu Verification, Validation, and Test finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by