Connect points of specific height that is a string

1 visualizzazione (ultimi 30 giorni)
Hello!
I want to connect the points x and z of an excel table to a specific height which is a string
%% Import data from spreadsheet
% Script for importing data from the following spreadsheet:
%
% Workbook: C:\Users\Ambi\Desktop\Dokumente\UNI\Fachhochschule\Semester 7\Bachelorarbeit\Excel\3D Bearbeitung BorderInfill InsideOut Stand 19.7.22 .xlsx
% Worksheet: Blatt 1 - Tabelle 1
%
% Auto-generated by MATLAB on 22-Jul-2022 12:31:15
%% Set up the Import Options and import the data
opts = spreadsheetImportOptions("NumVariables", 36);
% Specify sheet and range
opts.Sheet = "Blatt 1 - Tabelle 1";
opts.DataRange = "A4:AJ8";
% Specify column names and types
opts.VariableNames = ["Datum", "Probenummer", "AnzahlLagen", "AnzahlSpuren", "Kperform", "InfillStrategie", "KonturStrategie", "Spurbreitemm", "Spurhhemm", "Overlap", "OffsetInfillmm", "OffsetKonturmm", "Leistung", "Bearbeitungsrichtung", "SpurabstandEingepasst", "StartpunkteVerteiltVersatzInMm", "AnzahlAchsen", "MindestlhneLngemm", "GewichtgVorher", "GewichtgNachher", "Tellerdrehzahlmin1", "MittlereFrderrategtn", "Strahldurchmessermm", "Manuell", "Startpunkte", "EinUndberlaufmm", "Spurversatz", "Leistungsreduzierung", "Material", "Notizen", "VorschubInMmmin", "SchleifenAnScharfenEcken", "Radius", "Spuversatz", "ZeitExcls8SekAmAnfangInSek", "Wartezeit"];
opts.VariableTypes = ["datetime", "string", "double", "string", "categorical", "categorical", "categorical", "double", "string", "double", "string", "double", "double", "categorical", "categorical", "double", "double", "string", "double", "double", "double", "double", "double", "categorical", "categorical", "categorical", "double", "string", "categorical", "string", "double", "categorical", "double", "double", "double", "double"];
% Specify variable properties
opts = setvaropts(opts, ["Probenummer", "AnzahlSpuren", "Spurhhemm", "OffsetInfillmm", "MindestlhneLngemm", "Leistungsreduzierung", "Notizen"], "WhitespaceRule", "preserve");
opts = setvaropts(opts, ["Probenummer", "AnzahlSpuren", "Kperform", "InfillStrategie", "KonturStrategie", "Spurhhemm", "OffsetInfillmm", "Bearbeitungsrichtung", "SpurabstandEingepasst", "MindestlhneLngemm", "Manuell", "Startpunkte", "EinUndberlaufmm", "Leistungsreduzierung", "Material", "Notizen", "SchleifenAnScharfenEcken"], "EmptyFieldRule", "auto");
opts = setvaropts(opts, "Datum", "InputFormat", "");
% Import the data
DBearbeitungBorderInfillInsideOutStand19S1 = readtable("C:\Users\Ambi\Desktop\Dokumente\UNI\Fachhochschule\Semester 7\Bachelorarbeit\Excel\3D Bearbeitung BorderInfill InsideOut Stand 19.7.22 .xlsx", opts, "UseExcel", false);
%% Clear temporary variables
clear opts
DBearbeitungBorderInfillInsideOutStand19S1.Pulvergefoerdert = (DBearbeitungBorderInfillInsideOutStand19S1.ZeitExcls8SekAmAnfangInSek +8)/60 ...
.* DBearbeitungBorderInfillInsideOutStand19S1.MittlereFrderrategtn .* ...
DBearbeitungBorderInfillInsideOutStand19S1.Tellerdrehzahlmin1;
DBearbeitungBorderInfillInsideOutStand19S1.Massendifferenz = DBearbeitungBorderInfillInsideOutStand19S1.GewichtgNachher - DBearbeitungBorderInfillInsideOutStand19S1.GewichtgVorher;
DBearbeitungBorderInfillInsideOutStand19S1.Nutzungsgrad = DBearbeitungBorderInfillInsideOutStand19S1.Massendifferenz ./ DBearbeitungBorderInfillInsideOutStand19S1.Pulvergefoerdert
x = [DBearbeitungBorderInfillInsideOutStand19S1.Nutzungsgrad];
z = [DBearbeitungBorderInfillInsideOutStand19S1.KonturStrategie];
y = [DBearbeitungBorderInfillInsideOutStand19S1.AnzahlLagen];
plot3(y,x,z,'s--')
grid on
Error using matlab.io.ImportOptions/readtable
Unable to find or open 'C:\Users\Ambi\Desktop\Dokumente\UNI\Fachhochschule\Semester 7\Bachelorarbeit\Excel\3D Bearbeitung BorderInfill InsideOut Stand 19.7.22 .xlsx'. Check the path and filename or
file permissions.
The result is almost right, the only thing that i dont want is the connection between the z heights.
Some background info for a better understanding: I want to compare the powderefficiency (x) per layer(y) (1 to 12) of 2 strategies (z)
i am still barely new to matlab - i hope you can help me!
Pascal
  1 Commento
Star Strider
Star Strider il 22 Lug 2022
The Comment by @Pascal to my now deleted answer (since I still do not understand what the result should be) —
Sorry if you misunderstood - english is not my first language :) its pretty hard to formulate this question in english
Z is more of a separator.
As of right now i only have 2 possible z strings :
1. "Erst Kontur"
2. "Nur Fläche"
Those are 2 Deposition Strategies i use in my lab.
x is now the powderefficiency and y the number of layers.
For example i have done 2 specimen with the following parameters:
  1. z= erst kontur, x = .45% and y = 12 layers
  2. z = erst kontur x =.35% and y = 1 layer
now i have done an additional 2 but with the following parameters:
1. z = Nur fläche, x = .45% and y = 12 layer
2. z = Nur fläche , x = .35% and y = 1 layer
I now want to plot all points but only connect the points where z is equal. That means 2 Lines that are separate from each other. I guess you can say they are kind of like 2 height lines
If you look at the picture i attached in the original post you can see that there is a line connecting the 2 Z values, thats the only thing i want gone.
is that making it clearer?

Accedi per commentare.

Risposta accettata

Voss
Voss il 22 Lug 2022
load InsideOutTable.mat
DBearbeitungBorderInfillInsideOutStand19S1.Pulvergefoerdert = (DBearbeitungBorderInfillInsideOutStand19S1.ZeitExcls8SekAmAnfangInSek +8)/60 ...
.* DBearbeitungBorderInfillInsideOutStand19S1.MittlereFrderrategtn .* ...
DBearbeitungBorderInfillInsideOutStand19S1.Tellerdrehzahlmin1;
DBearbeitungBorderInfillInsideOutStand19S1.Massendifferenz = DBearbeitungBorderInfillInsideOutStand19S1.GewichtgNachher - DBearbeitungBorderInfillInsideOutStand19S1.GewichtgVorher;
DBearbeitungBorderInfillInsideOutStand19S1.Nutzungsgrad = DBearbeitungBorderInfillInsideOutStand19S1.Massendifferenz ./ DBearbeitungBorderInfillInsideOutStand19S1.Pulvergefoerdert
DBearbeitungBorderInfillInsideOutStand19S1 = 5×39 table
Datum Probenummer AnzahlLagen AnzahlSpuren Kperform InfillStrategie KonturStrategie Spurbreitemm Spurhhemm Overlap OffsetInfillmm OffsetKonturmm Leistung Bearbeitungsrichtung SpurabstandEingepasst StartpunkteVerteiltVersatzInMm AnzahlAchsen MindestlhneLngemm GewichtgVorher GewichtgNachher Tellerdrehzahlmin1 MittlereFrderrategtn Strahldurchmessermm Manuell Startpunkte EinUndberlaufmm Spurversatz Leistungsreduzierung Material Notizen VorschubInMmmin SchleifenAnScharfenEcken Radius Spuversatz ZeitExcls8SekAmAnfangInSek Wartezeit Pulvergefoerdert Massendifferenz Nutzungsgrad ___________ ___________ ___________ ____________ ________ _______________ _______________ ____________ _________ _______ ______________ ______________ ________ ____________________ _____________________ ______________________________ ____________ _________________ ______________ _______________ __________________ ____________________ ___________________ _______ ___________ _______________ ___________ ____________________ ________ _________________________________________________________________________________________________________________________________________ _______________ ________________________ ______ __________ __________________________ _________ ________________ _______________ ____________ 18-Jul-2022 "1C12" 12 "8" Quader Inside-Out Erst Kontur 2974 " .55" 0.3 "-2.08" 0 4000 +-xy Ja 0 3 ".5" 201.27 274.35 4.8 10.48 2.9 - In Ecken 3-5 0 "100/85/80" ST32 "Sehr unschöne Oberfläche, Einkerbung bei den Starts, dadurch enstehende diagonale Leistungsreduzierung wurde nicht übernommen?" 4200 Ja 7 0 156 0 137.5 73.08 0.5315 18-Jul-2022 "2C1" 1 "8" Quader Inside-Out Erst Kontur 2974 " .55" 0.3 "-2.08" 0 4000 +-xy Ja 0 3 ".5" 194.1 200.05 4.8 10.48 2.9 - In Ecken 3-5 0 "-" ST32 "" 4200 Ja 7 0 12.8 0 17.439 5.95 0.34119 19-Jul-2022 "3C12" 12 "8" Quader Inside-Out Erst Kontur 2974 " .55" 0.3 "-2.08" 0 4000 +-xy Ja 5 3 ".5" 204.01 271.7 4.8 10.5 2.9 - In Ecken 3-5 0 "100/85/80" ST32 "Erhebungen im Kontur bereich und im Zentrum" 4200 Ja 7 0 168 0 147.84 67.69 0.45786 19-Jul-2022 "4C6/1" 6 "8" Quader Inside-Out Nur Fläche 2974 " .55" 0.3 "-2.08" 0 4000 +-xy Ja 10 3 ".5" 191.85 221.45 4.8 10.5 2.9 - In Ecken 3-5 0 "100/90/80/67,5" ST32 "Anbindungsfehler durch zurückstellen der Leistung auf 67,5%, deutlich weniger Aufbau als erwartet, „Nippel“haftiger aufbau in der Mitte" 4200 - 0 0 63 0 59.64 29.6 0.49631 21-Jul-2022 "4C6/2" 6 "8" Quader Inside-Out Nur Fläche 2974 " .55" 0.3 "-2.08" 0 4000 +-xy Ja 10 3 ".5" NaN NaN NaN NaN 2.9 - In Ecken 3-5 0 "100/85/80" ST32 "" 4200 - 0 0 63 0 NaN NaN NaN
x = [DBearbeitungBorderInfillInsideOutStand19S1.Nutzungsgrad];
z = [DBearbeitungBorderInfillInsideOutStand19S1.KonturStrategie];
y = [DBearbeitungBorderInfillInsideOutStand19S1.AnzahlLagen];
grid on
hold on
[uz,~,jj] = unique(z);
for ii = 1:numel(uz)
idx = jj == ii;
plot3(y(idx),x(idx),z(idx),'bs--')
end
view(3)
  3 Commenti
Pascal
Pascal il 22 Lug 2022
( 2nd red point is added for better visibility)

Accedi per commentare.

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by