<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Plotten von Daten aus C++ mit Matlab]]></title><description><![CDATA[<p>Salü zusammen</p>
<p>Ich bin dabei, gewisse Daten mit C++ zu generieren (u.a. in Form einer Matrix mit den entsprechenden Datenpunkten), und würde diese Daten dann gerne mit Matlab plotten.</p>
<p>Wie aber kann ich solche Daten aus C++ extrahieren? Wie kann ich die in einer Datei (z.B. Daten.mat) speichern, welche mit Matlab kompatibel ist?</p>
<p>Danke für die Antwort</p>
<p>Engin</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/224311/plotten-von-daten-aus-c-mit-matlab</link><generator>RSS for Node</generator><lastBuildDate>Fri, 02 Oct 2026 20:01:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/224311.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Oct 2008 09:15:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 09:15:09 GMT]]></title><description><![CDATA[<p>Salü zusammen</p>
<p>Ich bin dabei, gewisse Daten mit C++ zu generieren (u.a. in Form einer Matrix mit den entsprechenden Datenpunkten), und würde diese Daten dann gerne mit Matlab plotten.</p>
<p>Wie aber kann ich solche Daten aus C++ extrahieren? Wie kann ich die in einer Datei (z.B. Daten.mat) speichern, welche mit Matlab kompatibel ist?</p>
<p>Danke für die Antwort</p>
<p>Engin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595347</guid><dc:creator><![CDATA[Engin84]]></dc:creator><pubDate>Wed, 08 Oct 2008 09:15:09 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 09:22:24 GMT]]></title><description><![CDATA[<p>a) rausfinden wie das Format der Datei ist<br />
b) Daten in dem Format in eine Datei speichern</p>
<p>Bei welchem Punkt hängst du momentan?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595351</guid><dc:creator><![CDATA[Fellhuhn]]></dc:creator><pubDate>Wed, 08 Oct 2008 09:22:24 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 09:29:32 GMT]]></title><description><![CDATA[<p>Salü Fellhuhn</p>
<p>Ja, ich hab das noch nie gemacht, daher häng ich am Anfang schon.</p>
<p>Also, ich muss eine Datei erzeugen, die Daten.mat heisst.<br />
Diese Datei soll den Array mit 2 Zeilen und N Spalten enthalten.<br />
Den Array hab ich erzeugt.</p>
<p>Jetzt frag ich mich einfach, wie ich diesen Array in die Datei &quot;&quot;.mat speichern kann, damit ich diese dann mit Matlab aufrufen kann...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595357</guid><dc:creator><![CDATA[Engin84]]></dc:creator><pubDate>Wed, 08 Oct 2008 09:29:32 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 09:36:06 GMT]]></title><description><![CDATA[<p>Also es ist rein textuell?</p>
<p>Interessant sind für dich schon einmal die Header &lt;fstream&gt; und &lt;iostream&gt;.</p>
<pre><code class="language-cpp">#include &lt;fstream&gt;

using namespace std;

// ...

  ofstream fout(&quot;Daten.mat&quot;);
  for(int i = 0; i &lt; AnzahlDaten; ++i){
    fout &lt;&lt; Daten[i].First &lt;&lt; &quot; &quot; &lt;&lt; Daten[i].Second &lt;&lt; &quot;\n&quot;;
  }
  fout.close();
// ...
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1595364</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595364</guid><dc:creator><![CDATA[Fellhuhn]]></dc:creator><pubDate>Wed, 08 Oct 2008 09:36:06 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 09:39:06 GMT]]></title><description><![CDATA[<p>*.mat ist binary. Das Format ist offen beschrieben, aber das will man sich nicht antun wenn es nicht unbedingt sein muss. Ich würde mir mal libmatio anschauen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595365</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595365</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 08 Oct 2008 09:39:06 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 09:39:22 GMT]]></title><description><![CDATA[<p>delete me</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595366</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595366</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 08 Oct 2008 09:39:22 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 09:41:13 GMT]]></title><description><![CDATA[<p>Danke für die Antworten.<br />
Aber was genau meint ihr mit &quot;rein texutell&quot;?</p>
<p>Ist also das, was Fellhuhn mir geschrieben hat, nicht benutzbar, wenn jetzt *.mat rein binär ist?</p>
<p>Gruss</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595368</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595368</guid><dc:creator><![CDATA[Engin84]]></dc:creator><pubDate>Wed, 08 Oct 2008 09:41:13 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 09:53:41 GMT]]></title><description><![CDATA[<p>Richtig. Du müsstest wissen wie die binäre Datei genau aufgebaut ist, wie groß jedes Feld ist und dies auch so abspeichern. Kein geringer Aufwand. Wenn es dafür schon Bibliotheken gibt (und &quot;libmatio&quot; klingt danach), sollte man die doch auch benutzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595373</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595373</guid><dc:creator><![CDATA[Fellhuhn]]></dc:creator><pubDate>Wed, 08 Oct 2008 09:53:41 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 10:00:13 GMT]]></title><description><![CDATA[<p>Falls du trotzdem dir mal das MatLab Format anschauen willst, empfehle ich <a href="http://www.wotsit.org" rel="nofollow">www.wotsit.org</a> .<br />
<a href="http://www.wotsit.org/list.asp?al=M" rel="nofollow">Hier</a> solltest du fündig werden, wie die *.mat Dateien aufgebaut sind.</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595378</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595378</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Wed, 08 Oct 2008 10:00:13 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 10:04:15 GMT]]></title><description><![CDATA[<p>Ev. kannst Du auch MatLab &quot;automatisieren&quot; bzw. exportierte Funktionen nutzen.<br />
<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/apiref/bqoqnz0.html" rel="nofollow">http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/apiref/bqoqnz0.html</a><br />
Wenn ich mich nicht irre, sollte das weiterhelfen.<br />
Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595379</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595379</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Wed, 08 Oct 2008 10:04:15 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 10:17:12 GMT]]></title><description><![CDATA[<p>Ich würde Deinen Datengenerator, der in C++ geschrieben ist, direkt von Matlab aus aufrufen. Matlab bietet extra eine API (Mex-API) an, mit der man sehr einfach Daten aus C/C++ (eigentlich ist es eine C-API, aber C++ Programme lassen sich trotzdem direkt einbinden) in Matlab hineinmekommen kann. Der Aufruf des C++-Programms gestalltet sich dann wie der Aufruf einer Matlab-Funktion.</p>
<p><a href="http://www.mathworks.de/access/helpdesk/help/techdoc/" rel="nofollow">Hier</a> ist die API beschrieben, und <a href="http://www.mathworks.de/access/helpdesk/help/techdoc/" rel="nofollow">das hier</a> ist der Einsprungspunkt für eigene Mex-Funktionen (sozusagen die main).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595384</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595384</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Wed, 08 Oct 2008 10:17:12 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 10:33:26 GMT]]></title><description><![CDATA[<p>So, alles hat wunderbar geklappt. Danke euch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595397</guid><dc:creator><![CDATA[Engin84]]></dc:creator><pubDate>Wed, 08 Oct 2008 10:33:26 GMT</pubDate></item><item><title><![CDATA[Reply to Plotten von Daten aus C++ mit Matlab on Wed, 08 Oct 2008 10:53:31 GMT]]></title><description><![CDATA[<p>Engin84 schrieb:</p>
<blockquote>
<p>So, alles hat wunderbar geklappt. Danke euch.</p>
</blockquote>
<p>Wie sieht denn nun die Lsg. aus?<br />
Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595414</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595414</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Wed, 08 Oct 2008 10:53:31 GMT</pubDate></item></channel></rss>