How to set spacing in MATLAB

4 visualizzazioni (ultimi 30 giorni)
Deepu S S
Deepu S S il 15 Nov 2021
Commentato: Adam Danz il 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)};
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 Commenti
Deepu S S
Deepu S S il 16 Nov 2021
spacing of plot
Adam Danz
Adam Danz il 16 Nov 2021
Sorry, I have no idea what the goals is.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by