PDA

View Full Version : MatLab display question


Spectre32
Sep12-04, 09:33 PM
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

enigma
Sep12-04, 10:06 PM
I'm confused what you're asking for...

what do you want the output to look like?

Spectre32
Sep12-04, 10:10 PM
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
Sep13-04, 02:21 AM
Try this:


for a=1
disp('a')
disp(' ')
disp(' ')
disp('b')
end


It should output

a


b

Spectre32
Sep13-04, 07:22 AM
AH! Score. Thanks man, it's workin now!