MatLab display question


by Spectre32
Tags: display, matlab
Spectre32
Spectre32 is offline
#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
Lemurs match scent of a friend to sound of her voice
Repeated self-healing now possible in composite materials
'Heartbleed' fix may slow Web performance
enigma
enigma is offline
#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
Spectre32 is offline
#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
enigma is offline
#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
Spectre32 is offline
#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