How can I plot from csv file?

2 ビュー (過去 30 日間)
Gyujin Park
Gyujin Park 2023 年 5 月 9 日
コメント済み: Gyujin Park 2023 年 5 月 14 日
Hi!
I am try to plot this csv file with shadowed error. (this is my photometry deltaF/F data with s.e. and I caculate average using excel )
Actually my lab person show to me but after than he delete code.
So I know I need caculate x as time using frame rate, and show him this note from TDT data.
Thanks for your help!
Object ID : RZ5P(1) - RZn Processor
Rate : 6103.5 Hz
Store ID : PC2/
Source : Strobe input
Invert : No
Offset : Yes
Count : Yes
Store ID : PC3/
Source : Strobe input
Invert : No
Offset : Yes
Count : Yes
Object ID : FibPho1 - Fiber Photometry
Store ID : 470A
Format : Float-32
Scale : Unity
Rate : 1000.0 Hz
Store ID : 405A
Format : Float-32
Scale : Unity
Rate : 1000.0 Hz
Store ID : Fi1d
Format : Float-32
Scale : Unity
Rate : 6103.5 Hz
Store ID : Fi1i
Mode : Single scalar
Format : Float-32
Scale : Unity
Pre Cap : 0.00 ms
Store ID : Fi1r
Format : Float-32
Scale : Unity
Rate : 6103.5 Hz

採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 5 月 10 日
Here is how to get some shadow error plot:
% Way 1. Not nice looking plot
D = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1379164/photometry.csv');
t = D(1,:); % Note that your time data is repeated values.
% That is why the time signal is recreated
t = linspace(min(t), max(t), numel(t));
y1 = (D(2,:));
SE = D(3,:);
y2 = (y1 + SE);
figure
ax = axes;
patch([t fliplr(t)], [y1 fliplr(y2)], [0.8 0.8 0.8], 'EdgeColor', 'r', 'FaceAlpha', 0.5)
grid on
ax.XAxisLocation = 'origin';
hold on
yy = .5*(y1+y2);
plot(t, yy, 'k', 'LineWidth', 2)
% Way -2. Nice looking plot
%% Smooth your data and plot it:
D = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1379164/photometry.csv');
t = D(1,:);
t = linspace(min(t), max(t), numel(t));
y1 = smoothdata(D(2,:));
SE = D(3,:);
y2 = smoothdata(y1 + SE);
figure
ax = axes;
patch([t fliplr(t)], [y1 fliplr(y2)], [0.8 0.8 0.8], 'EdgeColor', 'r', 'FaceAlpha', 0.5)
grid on
ax.XAxisLocation = 'origin';
hold on
yy = .5*(y1+y2);
plot(t, yy, 'k', 'LineWidth', 2)
  1 件のコメント
Gyujin Park
Gyujin Park 2023 年 5 月 14 日
Wow!
Thank you so much!!
I learn about Matlab and hope can create as like you!
Thanks again XD

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Identification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by