Debora
Posts:
26
Registered:
10/25/12
|
|
Re: GUI
Posted:
Dec 29, 2012 5:06 AM
|
|
Il giorno venerdì 28 dicembre 2012 14:28:07 UTC+1, Jan Simon ha scritto: > Dear Debora, > > > > > hello I have a problem with matlab's gui I can not graphic axes. load my data with the button but I can not get them to plot with axes. how should I do? thanks > > > > I cannot imagine what "cannot grahic axes" exactly means. Please post the code and describe the occurring problems e.g. by posting a complete copy of the error message. > > > > Kind regards, Jan
I have this code in the pushbutton: % --- Executes on button press in pushbutton1. [fname, pname] = uigetfile({'*.c3d','Vicon Files (*.c3d)'}, 'Choose Files:','MultiSelect', 'on'); filename = [pname, fname]; pointsLabel = {'C7', 'CLAV', 'CenterOfMass','KneeJointForce'}; acq = btkReadAcquisition(filename) ; global AV analogs num = length(pointsLabel); points = btkGetPoints(acq); firstFrame= btkGetFirstFrame (acq); lastFrame = btkGetPointFrameNumber(acq) - btkGetFirstFrame(acq) + 1; events=btkGetEvents(acq); [analogs analogsinfo]= btkGetAnalogs(acq); ratio= btkGetAnalogSampleNumberPerFrame(acq); AV=btkGetAnalogsValues(acq);
and I want the graphic in the fuction axes, my code for the graphic is this: global AV analogs
massimo = max(AV); MAX= max(massimo); my_colors={'r','y','k','m','b','g','c','w'}; MAX1= MAX+500; name= fieldnames(analogs); prova=char(name); [n,m]=size(prova); for i=1:n for j=1:m if prova(i,j)=='_'; prova(i,j)=' '; end end end [q w]=size(AV); for i=1:w AV(:,i)=AV(:,i)+((i-1)*MAX1); figure (1); subplot(2,1,1) hold on plot(AV(:,i),my_colors{i}) xlabel('sec'); ylabel('mV'); legend (prova); set (gca,'YTick',[ 0 2266 4492 6771 9000 11240 ]); set (gca,'YTickLabel',{'','','','','',''}); end
but this way I open a window with the graphic, and I want it on the interface. how should I do?
|
|