Register to reply

MatLab display question

by Spectre32
Tags: display, matlab
Share this thread:
Spectre32
#1
Sep12-04, 08:33 PM
P: 142
I gott add spaces into this output, how in sweet gods name do i do this? Here is my code:

disp( '' )
disp( 'Solution to workshop 5, exercise 3 ')
disp( 'Calculate the volume of a piece of iron by determining the amount of')
disp( 'water displaced as it is submerged.')



Thanks
Phys.Org News Partner Science news on Phys.org
Wildfires and other burns play bigger role in climate change, professor finds
SR Labs research to expose BadUSB next week in Vegas
New study advances 'DNA revolution,' tells butterflies' evolutionary history
enigma
#2
Sep12-04, 09:06 PM
Emeritus
Sci Advisor
PF Gold
enigma's Avatar
P: 1,817
I'm confused what you're asking for...

what do you want the output to look like?
Spectre32
#3
Sep12-04, 09:10 PM
P: 142
Well when it's displayed.. it looks like this:

Solution to workshop 5, exercise 3
Calculate the volume of a piece of iron by determining the amount of
water displaced as it is submerged.

I want it to look like this:

Solution to workshop 5, exercise 3

Calculate the volume of a piece of iron by determining the amount of

water displaced as it is submerged.

---with space(s) inbetween the lines. I can't figure out how to do this

enigma
#4
Sep13-04, 01:21 AM
Emeritus
Sci Advisor
PF Gold
enigma's Avatar
P: 1,817
MatLab display question

Try this:

for a=1
   disp('a')
   disp(' ')
   disp(' ')
   disp('b')
end
It should output
a


b
Spectre32
#5
Sep13-04, 06:22 AM
P: 142
AH! Score. Thanks man, it's workin now!


Register to reply

Related Discussions
MATLAB question Math & Science Software 3
7-segment display question Electrical Engineering 2
Camera and Display RGB question General Engineering 1
Develop a program to display a number, on a single 7 segment LED display Computing & Technology 6
Display a number, on a single 7 segment LED display Introductory Physics Homework 0