Borrar filtros
Borrar filtros

the input N change in formula input

1 visualización (últimos 30 días)
sonu
sonu el 4 de Mayo de 2013
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

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 4 de Mayo de 2013
Lamda=1;
c=2;
D = @(N) -(2*pi*c/Lamda^2)*N
D(5) % for N=5
  3 comentarios
Walter Roberson
Walter Roberson el 4 de Mayo de 2013
D(input('ENTER THE VALUE OD N'))
Azzi Abdelmalek
Azzi Abdelmalek el 4 de Mayo de 2013
Editada: Azzi Abdelmalek el 4 de Mayo de 2013
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

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by