Calculator by matlab sin, cos, tan
Show older comments
Hi I have made a new GUI in matlab for a calculator. The calculator is fully working exept there is an error with the sin, cos and tan buttons. If i click one of them i get this error:
Error in @(hObject,eventdata)calculator('pushbutton13_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
I think i made an error in the pushbutton code, just not sure whats the error
I have attached the m file for the calculator pluss the figure.
Accepted Answer
More Answers (1)
James Berryman
on 4 Dec 2019
0 votes
how would I use MATLAB to find tan2x − sec2x.
1 Comment
Walter Roberson
on 4 Dec 2019
f1 = @(x) tan(2*x) - sec(2*x)
f2 = @(x) tan(x).^2 - sec(x).^2
and call f1(x) or f2(x) depending which of the two meanings you intended.
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!