create a grid fuction
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I wanna write a function .mfile to create a computational grid.
function kgrid = test_environment
Nx = 10;
Ny = 10;
Nz = 10;
dx = 0.001;
dy = 0.001;
dz = 0.001;
kgrid = test_environment (Nx, dx, Ny, dy, Nz, dz);
why do i get this error: Too many input arguments.????
0 comentarios
Respuestas (3)
Iain
el 29 de Mayo de 2013
It is because in your function declaration, you do not define inputs.
function kgrid = test_environment(nx,dx,ny,dy,nz,dz)
Lets you input those parameters.
Look at the help on varargin and nargin if you want optional arguments.
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!