I'm trying to create a GUI in Matlab that plots a specific graph once you've entered your data in the edit text zones. My problem is, when I try to plot a graph using this code:
function pushbutton3_Callback(hObject, eventdata, handles)
a = str2num(get(handles.edit1,'string'));
b = str2num(get(handles.edit2,'string'));
n1 = str2num(get(handles.edit6,'string'));
n2 = str2num(get(handles.edit4,'string'));
lambda = str2num(get(handles.edit5,'string'));
m = ones(1,a)
s = ones(1,b)
f = ones(1,n1)
g = ones(1,n2)
k = ones(1,lambda)
c = k.*(m.*s/f.*g)
i = -3:1:5
figure
p= plot(c,i)
This error message keeps poping out: Error times Matrix dimensions must agree
. I don't know what to do? I seriously need help because I have a deadline for this project and I'm clueless! Thanks in advance.