Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: graph problem
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
anil.m.007@gmail.com

Posts: 22
Registered: 2/16/11
graph problem
Posted: Apr 10, 2011 7:29 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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,



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.