From: Mohammad on
Hi guys,

I kinda forgot how to call t=a function like:

function []= moleculenodes(file_name, L, R, z)
fid1=fopen(file_name,'wt');
m = 5*L;
n = sqrt(.5)*R+.5*L;
o = .5*L+(.5-z*.5)*R*sqrt(.5);
....

It was something like:

moleculenodes(1, 1, 1) but that didn't work.

Thanks!

Cordially, Mohammad
From: Andy on
"Mohammad " <jaber2(a)uni.uiuc.edu> wrote in message <i1ktm9$nm8$1(a)fred.mathworks.com>...
> Hi guys,
>
> I kinda forgot how to call t=a function like:
>
> function []= moleculenodes(file_name, L, R, z)
> fid1=fopen(file_name,'wt');
> m = 5*L;
> n = sqrt(.5)*R+.5*L;
> o = .5*L+(.5-z*.5)*R*sqrt(.5);
> ...
>
> It was something like:
>
> moleculenodes(1, 1, 1) but that didn't work.
>
> Thanks!
>
> Cordially, Mohammad

Well, moleculenodes(1,1,1) won't work because moleculenodes, as you've shown, requires four input arguments.
From: dpb on
Mohammad wrote:
> Hi guys,
>
> I kinda forgot how to call t=a function like:
>
> function []= moleculenodes(file_name, L, R, z)
> fid1=fopen(file_name,'wt');
> m = 5*L;
> n = sqrt(.5)*R+.5*L;
> o = .5*L+(.5-z*.5)*R*sqrt(.5);
> ...
>
> It was something like:
>
> moleculenodes(1, 1, 1) but that didn't work.
....

The function prototype needs a filename as the first argument...


--