Borrar filtros
Borrar filtros

Grid Data in 3D matrices

2 visualizaciones (últimos 30 días)
Hege
Hege el 12 de Jul. de 2020
Comentada: Hege el 13 de Jul. de 2020
Hi, I want to get the values of GridInput, GridX,GridY and Grid Z data as the attached First image for my script. I tried a lot and saved my script as save(__.mat file). It does not give above data. second image is my effort and attached code is my own script. Appreciate your kind support as I am new to the matlab.
B=zeros(10,10,10);
for i =1:10;
for j=1:10;
for k=1:10;
if ((i==1)||(i==2)||(i==3)||(i==4)||(i==5)||(i==6)||(i==7)||(i==8)||(i==9)||(i==10))&&((j==1)||(j==10))&&((k==1)||(k==10));
B(i,j,k)=1;
else B(i,j,k)=0;
if((i==1)||(i==10))&& ((j==1)||(j==2)||(j==3)||(j==4)||(j==5)||(j==6)||(j==7)||(j==8)||(j==9)||(j==10))&&((k==1)||(k==10));
B(i,j,k)=1;
else B(i,j,k)=0;
if ((i==1)||(i==10))&&((j==1)||(j==10))&& ((k==1)||(k==2)||(k==3)||(k==4)||(k==5)||(k==6)||(k==7)||(k==8)||(k==9)||(k==10));
B(i,j,k)=1;
else B(i,j,k)=0;
end
end
end
end
end
end
  2 comentarios
KSSV
KSSV el 13 de Jul. de 2020
What is that you are trying to do?
Hege
Hege el 13 de Jul. de 2020
I want to view my model using the stl file.But I want to use the function developed in the mathworks website which is shown in the attached link(CONVERT_voxels_to _stl). I have the problem that how they have taken the GridInput,GridX,GridY and GridZ values as shown in First Image of this question. Below image show their example script which means that they have used their example .mat file(to import the GridInput,GridX,GridY and GridZ values to their script).My aim is to find these values in my 3d matrix(Above attached script) and import it to my script.But I am facing the problems in finding these values in my .mat file.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Display Image en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by