NEED SOLUTION FOR THE FOLLOWING ERROR
이전 댓글 표시
I'm having this error " Undefined function or variable 'tt'. Error in plot_FB_triggers (line 7) Plot(tt, can.DATDev.FB_Triggers.ctimeu, ... " What should I do If I get this error?
답변 (1개)
BhaTTa
2025년 7월 18일
Hey @Pavan Kumar Reddy Yannam, the error means MATLAB can't find a variable or function named tt when it tries to execute line 7 of your plot_FB_triggers.m file.
Can you please verify the checklist below:
1. Is tt defined before line 7?
- Look at the lines before line 7 in plot_FB_triggers.m. Is there a line that assigns a value to tt? For example:
tt = (1:100)'; % Example: create a time vector
% Or, is it loaded from somewhere?
% load('my_data.mat', 'tt');
2. If plot_FB_triggers is a function, is tt passed as an input argument?
function plot_FB_triggers(tt, can) % <--- tt must be an input
% ...
Plot(tt, can.DATDev.FB_Triggers.ctimeu, ...
end
3. Typo? Double-check the spelling of tt. Maybe it's t or time or something else in your code.
Hope it helps.
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!