フィルターのクリア

the input N change in formula input

1 回表示 (過去 30 日間)
sonu
sonu 2013 年 5 月 4 日
hi can any one tell me i have a formula D = −(2πc/λ^2) N where the c and λ are constant.but i want to make a program using matlab in which i give the any value of N its show the output. can any one tell m what i do... thnx

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 5 月 4 日
Lamda=1;
c=2;
D = @(N) -(2*pi*c/Lamda^2)*N
D(5) % for N=5
  3 件のコメント
Walter Roberson
Walter Roberson 2013 年 5 月 4 日
D(input('ENTER THE VALUE OD N'))
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 5 月 4 日
編集済み: Azzi Abdelmalek 2013 年 5 月 4 日
You can use
N=input('enter N')
Lamda=1;
c=2;
D = -(2*pi*c/Lamda^2)*N;
display(D)
You should learn Matlab basics

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by