Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
graph problem
Posted:
Apr 10, 2011 7:29 AM
|
|
hi everyone,
i am creating a GUI for controlling smps(switching mode power supply).i created everything according to my project i getting the voltages from smps continuously i want display the these values into graph with respect to time. but i created graph using axis function like this function axes11_CreateFcn(hObject, eventdata, handles) axis([0 100 0 100]) grid on;
but i am getting the data from other function like this function Read_Callback(hObject, eventdata,handles) p = get(handles.pmbus,'String'); da=hex2dec(p); fwrite(handles.serConn,[da 136]); rb = fread(handles.serConn); y = dec2hex(rb); cd=strcat(y); sa=strcat(cd(1),cd(3),cd(2),cd(4)); x=hex2dec(sa); exp=(-2*bitget(x,16)+1)*(bitcmp(bitshift(x,-11),5)+1); mant=bitand(hex2dec('7ff'),x); vout=mant*2^exp; vo=num2str(vout); set(handles.vinput,'String',vo); ax=str2num(vo); set(handles.axes11,ax);
if i use like this its getting error in read function
this function gives error set(handles.axes11,ax); but how to handles the Axis from out side the function plz help me
thank you,
|
|
|
|