How to name by checking the entrys of a table?
Show older comments
Hi Guys, i I'm new in matlab so i need a little help to get started.
What i'm doning is to use the fullfact Method to create a table. There are 5 columns then and 216 rows. The number of factors depends - let me show you:
diameter=[ 10 15]; % diameter in mm
density=[ 0 50 100]; % density in percent
orientation=[ 0, 45, 90]; % orientaion in degree
seam=[0,1]; % 0 align, 1 random (can be adjusted to strings if really wanted)
layheight=[ 0.2 0.3 0.4]; % layheigth in mm
contournumbers=[1 2]; % numbers of contours
What i want to do is to get a logic naming of the single parts.
% Density: FG1, FG2
% Orientation: O0 O45 O90
% Seam: SO, SC
% Diamater: D15, D20
% Layheight: LL, LM, LH
% contournumbers: C1, C2
So a example of the part with all factor to be on 1 would be: FG1_O0_SO_D15_LL_C1
How can i like get a new table where matlab checks the entry of the columns in each row and depending on the entry get me out a new table with the naming?
Would be logic to get with "for" through all of the datas, but actually i can not figure out how to get me a string with a internal if function.
hope you guys can help me!
Thanks in advance!
2 Comments
Jan
on 16 Nov 2018
I do not understand the question. "use the fullfact Method to create a table" is not clear. fullfact replies a matrix, doesn't it? Then how is the table created? "get a logic naming of the single parts" - what are "parts"?
"So a example of the part with all factor to be on 1 would be: FG1_O0_SO_D15_LL_C1"
"hope you guys can help me!"
The best help you will get is advice to avoid what you are trying to do:
"How can i like get a new table where matlab checks the entry of the columns in each row and depending on the entry get me out a new table with the naming?"
Ugh. Forcing meta-data into variable names is one way that some beginners force themselves into writing pointlessly slow, complex, buggy code that is hard to debug. Read this to know why:
Accepted Answer
More Answers (1)
Vincent Kelber
on 17 Nov 2018
0 votes
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!