In article <g5r3jd$s4u$1@fred.mathworks.com>,
ching l <chinglnc@hotmail.com> wrote:
>a= 80;
>csvwrite(num2str(a), [2]);
>the result = 80.dat
>what can I do so that the file name can be 80_1?
csvwrite(num2str(a,'%d_1.dat'),[2]);
--
"If there were no falsehood in the world, there would be no
doubt; if there were no doubt, there would be no inquiry; if no
inquiry, no wisdom, no knowledge, no genius."
-- Walter Savage Landor
roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <g5r50a$7ro$1@canopus.cc.umanitoba.ca>...
> In article <g5r3jd$s4u$1@fred.mathworks.com>,
> ching l <chinglnc@hotmail.com> wrote:
> >a= 80;
> >csvwrite(num2str(a), [2]);
>
> >the result = 80.dat
>
> >what can I do so that the file name can be 80_1?
>
> csvwrite(num2str(a,'%d_1.dat'),[2]);
> --
> "If there were no falsehood in the world, there would be no
> doubt; if there were no doubt, there would be no
inquiry; if no
> inquiry, no wisdom, no knowledge, no genius."
> -- Walter
Savage Landor
i really can't see anything wrong with the codes below,
it has the bracket unbalanced error, but it has 4 pairs
brackets which is right....
"ching l" <chinglnc@hotmail.com> wrote in message
<g5r7iv$aus$1@fred.mathworks.com>...
> roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
> message <g5r50a$7ro$1@canopus.cc.umanitoba.ca>...
> > In article <g5r3jd$s4u$1@fred.mathworks.com>,
> > ching l <chinglnc@hotmail.com> wrote:
> > >a= 80;
> > >csvwrite(num2str(a), [2]);
> >
> > >the result = 80.dat
> >
> > >what can I do so that the file name can be 80_1?
> >
> > csvwrite(num2str(a,'%d_1.dat'),[2]);
> > --
> > "If there were no falsehood in the world, there would
be no
> > doubt; if there were no doubt, there would be no
> inquiry; if no
> > inquiry, no wisdom, no knowledge, no genius."
> > -- Walter
> Savage Landor
>
>
> i really can't see anything wrong with the codes below,
> it has the bracket unbalanced error, but it has 4 pairs
> brackets which is right....
>
> csvwrite ((num2str(ceil(handles.randValue)),'%d_1.dat'), [1]);
>
>
>
Just because you have 4 of each doesn't mean it makes
sense... you have the wrong number of arguments for your
functions. You need this:
Also the square brackets arent doing anything. Though it
seems like you want something other than "1" for your last
argument anyway... you realize this will just output a text
file with the number 1 in it, right?
"matt dash" <n.a@mail.com> wrote in message
<g5r8iq$im9$1@fred.mathworks.com>...
> "ching l" <chinglnc@hotmail.com> wrote in message
> <g5r7iv$aus$1@fred.mathworks.com>...
> > roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
> > message <g5r50a$7ro$1@canopus.cc.umanitoba.ca>...
> > > In article <g5r3jd$s4u$1@fred.mathworks.com>,
> > > ching l <chinglnc@hotmail.com> wrote:
> > > >a= 80;
> > > >csvwrite(num2str(a), [2]);
> > >
> > > >the result = 80.dat
> > >
> > > >what can I do so that the file name can be 80_1?
> > >
> > > csvwrite(num2str(a,'%d_1.dat'),[2]);
> > > --
> > > "If there were no falsehood in the world, there would
> be no
> > > doubt; if there were no doubt, there would be no
> > inquiry; if no
> > > inquiry, no wisdom, no knowledge, no genius."
> > > -- Walter
> > Savage Landor
> >
> >
> > i really can't see anything wrong with the codes below,
> > it has the bracket unbalanced error, but it has 4 pairs
> > brackets which is right....
> >
> > csvwrite ((num2str(ceil(handles.randValue)),'%d_1.dat'),
[1]);
> >
> >
> >
>
>
>
> Just because you have 4 of each doesn't mean it makes
> sense... you have the wrong number of arguments for your
> functions. You need this:
>
> csvwrite(num2str(ceil(handles.randValue),'%d_1.dat'), [1]);
>
> Also the square brackets arent doing anything. Though it
> seems like you want something other than "1" for your last
> argument anyway... you realize this will just output a text
> file with the number 1 in it, right?
thanks for that. Yea, I know it will just output a text file
with the number 1.
Ideally, I want to have different arrays when the function
is called everytime, something like this...
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.