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 Center および File ExchangeNumerical 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