Plot Matrix with 3 columns

10 visualizzazioni (ultimi 30 giorni)
Benjamin Liebsch
Benjamin Liebsch il 23 Lug 2015
Commentato: Benjamin Liebsch il 23 Lug 2015
Hello, I have more than 60 matrices with the same struture. Now I want to plot every matrix - column 1 vs. column 2. I am able to do it manually, but not with a script. The automatically generated script is:
function createfigure(Protokoll2, Y1) %CREATEFIGURE(PROTOKOLL1, Y1) % PROTOKOLL1: vector of x data % Y1: vector of y data
% Auto-generated by MATLAB on 22-Jul-2015 14:59:50
% Create figure figure1 = figure;
% Create axes axes1 = axes('Parent',figure1); box(axes1,'on'); hold(axes1,'on');
% Create plot plot(Protokoll2,Y1,'DisplayName','Protokoll128822(:,1)');
Where is the mistake?
The image shows the correct result manually generatet without script.

Risposte (1)

Thorsten
Thorsten il 23 Lug 2015
The mistake is that your script contains only comments, but no commands. It should read
% Auto-generated by MATLAB on 22-Jul-2015 14:59:50
% Create figure
figure1 = figure;
% Create axes
axes1 = axes('Parent',figure1); box(axes1,'on'); hold(axes1,'on');
% Create plot
plot(Protokoll2,Y1,'DisplayName','Protokoll128822(:,1)');
  1 Commento
Benjamin Liebsch
Benjamin Liebsch il 23 Lug 2015
That was just a mistake by duplicating the script.

Accedi per commentare.

Categorie

Scopri di più su Graphics Performance in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by