Crunch Time - User Interface Set Variable
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi Everyone, I have been working on this code for weeks and finally have gotten it to work but can't manage to create a user interface. Essentially I have a bunch of matlab code written with one being the following:
a = 4;
b = 5;
c = 12;
chord = 1;
angle = 40;
npoints = 500;
[naca1,naca2,naca3, naca4] = Naca4( a,b,c, chord,angle*pi/180, npoints);
figure(1);
hold on;
axis fill;
title(['Naca ',num2str(a),num2str(b),num2str(c)]);
plot(naca1(:,1),naca1(:,2),'r',naca2(:,1),naca2(:,2),'g');
plot(naca3(:,1),naca3(:,2),'b',naca4(:,1),naca4(:,2),'b');
axis equal;
The code above creates a figure from a b and c. Everything works except this.
I am trying to create a user interface where someone could define a b and c and see the resulting graph. I have tried watching countless GUI tutorials but I don t seem to be managing to understand how it works.
Any help would be appreciated.
0 Commenti
Risposte (1)
Walter Roberson
il 11 Apr 2014
inputdlg() . And remember to convert the resulting strings to numeric values with str2double()
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!