Thread Subject: simple question on print

Subject: simple question on print

From: Vihang Patil

Date: 7 Feb, 2008 15:53:02

Message: 1 of 5

Hello
Probably a very dumb question,but how do I send the data
from a string variable to a printer?

ex:
str = 'My nams is Vihang';
print(str);

But I get this error,
??? Error using ==> graphics\private\validate
Error using ==> graphics\private\validate
No Figure to print.

I dont have any figure window, just want to print the value
from the string to the printer.
And one more thing, I dont want any dialog box to open after
I issue the print command. It should automatically send the
data from the string to the default printer.

Regards
Vihang

Subject: simple question on print

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 7 Feb, 2008 16:49:43

Message: 2 of 5

In article <fof9gu$ifj$1@fred.mathworks.com>,
Vihang Patil <vihang_patil@yahoo.com> wrote:

>Probably a very dumb question,but how do I send the data
>from a string variable to a printer?

Matlab does not provide any portable way of doing that.


>But I get this error,
>??? Error using ==> graphics\private\validate

The \ suggest you are using MS Windows. If so,
http://groups.google.ca/group/comp.soft-sys.matlab/msg/4f75ac214fd7ceea
That's Peter Boettcher, Nov 13 2007, "Formatting rows"
--
This is a Usenet signature block. Please do not quote it when replying
to one of my postings.
http://en.wikipedia.org/wiki/Signature_block

Subject: simple question on print

From: Vihang Patil

Date: 8 Feb, 2008 18:03:04

Message: 3 of 5

roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <fofcr7$ef8$1@canopus.cc.umanitoba.ca>...
> In article <fof9gu$ifj$1@fred.mathworks.com>,
> Vihang Patil <vihang_patil@yahoo.com> wrote:
>
> >Probably a very dumb question,but how do I send the
data
> >from a string variable to a printer?
>
> Matlab does not provide any portable way of doing that.
>
>
> >But I get this error,
> >??? Error using ==> graphics\private\validate
>
> The \ suggest you are using MS Windows. If so,
> http://groups.google.ca/group/comp.soft-
sys.matlab/msg/4f75ac214fd7ceea
> That's Peter Boettcher, Nov 13 2007, "Formatting rows"
> --
> This is a Usenet signature block. Please do not quote it
when replying
> to one of my postings.
> http://en.wikipedia.org/wiki/Signature_block

Dear Walter
That was a really nice solution. The only one problem with
system(sprintf('notepad /p %s', filename)) , this command
was that it prints Page 1, page 2 and so on at the end of
the file which I dont want. Any way to suppress it?
Regards
Vihang

Subject: simple question on print

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 8 Feb, 2008 18:10:00

Message: 4 of 5

In article <foi5go$4jc$1@fred.mathworks.com>,
Vihang Patil <vihang_patil@yahoo.com> wrote:
>The only one problem with
>system(sprintf('notepad /p %s', filename)) , this command
>was that it prints Page 1, page 2 and so on at the end of
>the file which I dont want. Any way to suppress it?

http://www.worldstart.com/tips/tips.php/1421

might be useful in this matter.
--
This is a Usenet signature block. Please do not quote it when replying
to one of my postings.
http://en.wikipedia.org/wiki/Signature_block

Subject: simple question on print

From: Vihang Patil

Date: 9 Feb, 2008 06:26:10

Message: 5 of 5

Thank You
That was helpful.
And, I think it is high time that the people at the
Mathworks implement this trivial code, into the Matlab itself.
Vihang

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
printer Vihang Patil 7 Feb, 2008 10:55:20
print Vihang Patil 7 Feb, 2008 10:55:20
rssFeed for this Thread

Contact us at files@mathworks.com