Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

joining two strings + using pointers to the variable within strings 1

Status
Not open for further replies.

ajkalos

Electrical
Joined
Nov 21, 2006
Messages
1
Location
BA
Hi all,

I'm having 2 small problems and I'd appreciate your help.

First problem:
How to join two string variables:
time='100 ';
units='ms/div';
"time + units" = 100 ms/div ?

Second problem:
time=100;
wtime=int2str(time);
label('wtime ms/div'),
where wtime is a pointer to a string variable wtime.

Thanks ahead!
 
First:
time_and_units = [time units];

Second: (same as the first, just add one space character)
label([time ' ' 'ms/div'])
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top