how to call number inserted in "edit text" into the formula that i have code in "push button" for GUI?

PUSH BUTTON CODE
N = int; % number inserted in “edit text”
Wo = pi/5; t = -1:.001:11;
f = zeros(1,length(t));
for n = 1:2:N an = 4/(pi*n);
f = f+ an*sin(Wo*n*t);
end
plot(t,f)
axis([-1 11 -1.1 1.1])
title('GRAPH OF X(t)')
xlabel('Time')
ylabel('f(t)')

 採用された回答

KL
KL 2017 年 11 月 20 日
use get,
S = str2double(get(editBoxHandle, 'string'))

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Migrate GUIDE Apps についてさらに検索

質問済み:

2017 年 11 月 20 日

編集済み:

2017 年 12 月 9 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by