Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Loop with changing Variable

Subject: Loop with changing Variable

From: Andrew Peckat

Date: 14 Jul, 2010 23:01:21

Message: 1 of 7

I need to create a loop that will repeat this command every 100ms and increase the voltage by 0.1 up to 2.0 volts.

fprintf (vo, 'Volt:offs 0.1')

I'm new to Matlab so I'm still trying to learn stuff and this has been particularly challenging.

Subject: Loop with changing Variable

From: Michael

Date: 14 Jul, 2010 23:17:05

Message: 2 of 7

help for
help pause
help fprintf

Subject: Loop with changing Variable

From: Andrew Peckat

Date: 15 Jul, 2010 19:54:04

Message: 3 of 7

"Michael " <michaelrobbinsusenet@aol.com> wrote in message <i1lghh$qot$1@fred.mathworks.com>...
> help for
> help pause
> help fprintf

ok...anyone with anything more useful than this going to help?

Subject: Loop with changing Variable

From: Sean

Date: 15 Jul, 2010 19:59:04

Message: 4 of 7

"Andrew Peckat" <apeckat@indiana.edu> wrote in message <i1np0s$t48$1@fred.mathworks.com>...
> "Michael " <michaelrobbinsusenet@aol.com> wrote in message <i1lghh$qot$1@fred.mathworks.com>...
> > help for
> > help pause
> > help fprintf
>
> ok...anyone with anything more useful than this going to help?

How is that not useful? I think if you read about all 3 of those functions and implement them in the order given (or maybe switch pause/fprintf) it'll work just fine.

Subject: Loop with changing Variable

From: Andy

Date: 15 Jul, 2010 20:01:22

Message: 5 of 7

"Andrew Peckat" <apeckat@indiana.edu> wrote in message <i1np0s$t48$1@fred.mathworks.com>...
> "Michael " <michaelrobbinsusenet@aol.com> wrote in message <i1lghh$qot$1@fred.mathworks.com>...
> > help for
> > help pause
> > help fprintf
>
> ok...anyone with anything more useful than this going to help?

Did you type those commands at the command line and read the help files? Those three functions tell you how to loop, how to wait a set amount of time, and then how to print.

Subject: Loop with changing Variable

From: Jan Simon

Date: 15 Jul, 2010 20:14:04

Message: 6 of 7

Dear Andrew,

> I need to create a loop that will repeat this command every 100ms and increase the voltage by 0.1 up to 2.0 volts.
> fprintf (vo, 'Volt:offs 0.1')

Your description is not helpful. It is your turn to analyse your problem and give as many information as needed to understand your needs. If you do not know how to call FPRINTF, the newsgroup is a less efficient way to learn it, but "help fprintf" and "doc fprintf" are valuable advices.

Kind regards and welcom to Matlab, Jan

Subject: Loop with changing Variable

From: dpb

Date: 15 Jul, 2010 20:14:41

Message: 7 of 7

Andrew Peckat wrote:
> "Michael " <michaelrobbinsusenet@aol.com> wrote in message
> <i1lghh$qot$1@fred.mathworks.com>...
>> help for
>> help pause
>> help fprintf
>
> ok...anyone with anything more useful than this going to help?

OK, then how about

doc for
doc pause
doc fprintf

? :)

--

Tags for this Thread

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.

Contact us