필터 지우기
필터 지우기

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개)

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by