How to set spacing in MATLAB

조회 수: 4 (최근 30일)
Deepu S S
Deepu S S 2021년 11월 15일
댓글: Adam Danz 2021년 11월 16일
I want to give spacing to my plot,currently the spacing is 10,i want to change it into 15.
Note: i'm using MATLAB 2018a
function DisplaySettings_Callback(hObject, eventdata, handles)
% hObject handle to DisplaySettings (see GCBO)function DisplaySettings_Callback(hObject, eventdata, handles)
% hObject handle to DisplaySettings (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
prompt = {'Scaling Rate:','Spacing:','Channels to display:'};
dlg_title = 'Display Parameters---------------------------------------------------------';
num_lines = 1;
def = {num2str(handles.Scalefactor),num2str(handles.spacing),num2str(handles.dispchannels)};
options.Resize='on';
options.WindowStyle='normal';
options.Interpreter='tex';
answer = inputdlg(prompt,dlg_title,num_lines,def);
if(~isempty(answer))
handles.Scalefactor = str2double(answer{1});
handles.spacing = str2double(answer{2});
% handles.channels = str2double(answer{3});
handles.dispchannels = str2double(answer{3});
%Changed by Deepu @15/11/2021
def = {handles.Scalefactor,handles.spacing};
scale = handles.Scalefactor;
% scale=1000;
spacing = handles.spacing;
step = (handles.channels-handles.dispchannels)+1
% set(handles.eeg_slider,'SliderStep',[1/step 0.3]);
handles.plotch = [];
% handles.dispcol_start = 1;
% handles.dispcol_end = handles.dispchandles.dispchannels;
handles.dispcol_start = 1;
handles.dispcol_end = handles.dispchannels;
for i =1 : handles.channels
% handles.plotch(:,i)= handles.ch(:,i)+(i-1)*(-1250);
handles.plotch(:,i)= handles.ch(:,i)*(-scale*1000)+(i-1)*(-spacing*1000000);
end
end
guidata(hObject, handles);
plotChanneldata(hObject, eventdata, handles);
  댓글 수: 3
Deepu S S
Deepu S S 2021년 11월 16일
spacing of plot
Adam Danz
Adam Danz 2021년 11월 16일
Sorry, I have no idea what the goals is.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by