How to set spacing in MATLAB

6 views (last 30 days)
Deepu S S
Deepu S S on 15 Nov 2021
Commented: Adam Danz on 16 Nov 2021
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)};
answer = inputdlg(prompt,dlg_title,num_lines,def);
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)=,i)+(i-1)*(-1250);
guidata(hObject, handles);
plotChanneldata(hObject, eventdata, handles);
Adam Danz
Adam Danz on 16 Nov 2021
Sorry, I have no idea what the goals is.

Sign in to comment.

Answers (0)


Find more on General Applications in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by