JKU Mechatronik

Mechatronik Forum


Ausgaben in Matlab

#1 von projectionist , 09.04.2008 23:08

Hallo Leute.

Ich suche nach einer Funktion in Matlab die etwas ähnliches macht wie die Print[] Funktion in Mathematica.

Wenn ich einfach Strings auswerten lass, dann erscheint immer etwa so eine Ausgabe:

>> 'hallo'

ans =

'hallo'

>>

geht das schöner?
Ich will Text aus dem m-file im Command window ausgeben ohne diesen ans = .



Die Welt ist analog.

 
projectionist
Beiträge: 763
Registriert am: 07.11.2005


RE: Ausgaben in Matlab

#2 von Felix , 10.04.2008 06:29

fprintf ('hello world')
hello world >>

fprintf ('hello world\n')
hello world
>>

 
Felix
Beiträge: 337
Registriert am: 07.10.2005


RE: Ausgaben in Matlab

#3 von thomas , 10.04.2008 07:31

so müsst es auch funktionieren:

a:=sin(x):
'a'=a;

Als Ausgabe müsste stehen:
a=sin(x);



I'm not licensed to do anything.

thomas  
thomas
Beiträge: 225
Registriert am: 19.10.2005


RE: Ausgaben in Matlab

#4 von Cola+Mentos , 10.04.2008 14:44

noch 2 Möglichkeiten

disp('hello world');
fprintf('%s\n','hello world');
Beide sollen funktionieren

lg

Cola+Mentos  
Cola+Mentos
Beiträge: 44
Registriert am: 23.11.2006

zuletzt bearbeitet 10.04.2008 | Top

   

nichtlineare Diffglg
Maple & Maple Classic Worksheet

jku-Linz

Kostenlos Bilder hochladen
Xobor Erstelle ein eigenes Forum mit Xobor
Datenschutz