フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to take the value key in "edit text" and use it in formula coded in "push button"?

1 回表示 (過去 30 日間)
Neptune16
Neptune16 2017 年 12 月 9 日
閉鎖済み: Stephen23 2017 年 12 月 9 日
CODED UNDER PUSH BUTTON
N = 100; % i want this value "N" can be obtained from "edit text" so that I can varies the value of N, no need
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(['Fourier Series Representation w/ ' num2str(N) 'Terms'],'FontSize',16)
xlabel('Time')
ylabel('f(t)')
CODE UNDER EDIT TEXT (HELP ME WITH THIS)
  1 件のコメント
Stephen23
Stephen23 2017 年 12 月 9 日
duplicate:
https://www.mathworks.com/matlabcentral/answers/368135-how-to-call-number-inserted-in-edit-text-into-the-formula-that-i-have-code-in-push-button-for-gu

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by