MAIN_Estim_Long_Axon_por_Planos_Virtuales.m 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. %
  2. clear all;
  3. % %%
  4. clc
  5. % Leemos el archivo de Matlab conteniendo las neuronas
  6. % Path_Data_1 = '/Users/pepo/Google Drive (1)/Cesar Mario Axones/Neuronas/Selección de NeuroMorpho 23-2/Específicas - tipo 1/';
  7. % Path_Data_File_1 = '/Neuronas Especificas - Tipo 1.txt';
  8. % Path_Data_1 = '/Users/pepo/Google Drive (1)/Cesar Mario Axones/Neuronas/Selección de NeuroMorpho 23-2/Multiespecíficas - tipo 2/';
  9. % Path_Data_File_1 = '/Neuronas Multiespecificas - Tipo 2.txt';
  10. % Path_Data_1 = '/Users/pepo/Google Drive (1)/Cesar Mario Axones/Neuronas/Selección de NeuroMorpho 23-2/Inespecíficas - tipo 3/';
  11. % Path_Data_File_1 = '/Neuronas Inespecificas - Tipo 3.txt';
  12. Path_Data_1 = '/Users/pepo/Google Drive (1)/Cesar Mario Axones/Neuronas/Selección de NeuroMorpho 23-2/Locales- tipo 4/';
  13. Path_Data_File_1 = '/Neuronas Locales - Tipo 4.txt';
  14. % Read the names of files with raw data:
  15. fileID = fopen([Path_Data_1, Path_Data_File_1]); % Spanish Data by Carlos
  16. %
  17. names_1 = textscan(fileID,'%s', 'delimiter', '\n', 'whitespace', '');
  18. fclose(fileID);
  19. names_1 = names_1{1};
  20. %%
  21. clc
  22. num_Repet = 1; % Cada vez que se muestrea sale diferente porque los planos cambian. Se repite 5 veces apra obtener cierta estadística
  23. h_Cortes = 1; % Analizamos un corte cada 'h_Cortes' cortes de la muestra
  24. Grosor_Corte = 50; % En micras
  25. % El 'frame' es la sampling box en la que se introduce la esfera; esa caja luego se introduce en la celda de la rejilla en que se ha dividido el corte.
  26. sampling_box_height = Grosor_Corte; % en micras
  27. Sampling_Box_X = 50; % en micras
  28. Sampling_Box_Y = 50; % en micras
  29. % Distancias_Entre_Planos = [3:3:30]; % Vector con las distancia entre planos virtuales en micras
  30. Distancias_Entre_Planos = [1:1:10]; % Vector con las distancia entre planos virtuales en micras
  31. Step_Lengths = [70:10:150]; % Vector con los step lengths a considerar. En micras
  32. % Distancias_Entre_Planos = 5; % Vector con los diámetros de la sonda a considerar. En micras
  33. % Step_Lengths = 75; % Vector con los step lengths a considerar. En micras
  34. MATRIZ_Q = zeros( length( Step_Lengths ), length( Distancias_Entre_Planos ), length(names_1), num_Repet ); % Filas para los step_lengths y columnas para los diámetros de la sonda
  35. MATRIZ_ERROR_LENGTH = zeros( length( Step_Lengths ), length( Distancias_Entre_Planos ), length(names_1), num_Repet ); % Filas para los step_lengths y columnas para los diámetros de la sonda
  36. AXON_REAL_LENGTH = zeros(1, length(names_1));
  37. MATRIZ_ESTIMATED_AXON_LENGTH = zeros( length( Step_Lengths ), length( Distancias_Entre_Planos ), length(names_1), num_Repet );
  38. for kk = 1:num_Repet
  39. for rr = 1:length(names_1)
  40. % for rr = 1:230
  41. % for rr = 13
  42. tic
  43. % Leemos los archivos
  44. fname=fullfile(Path_Data_1, [names_1{rr}]);
  45. fname_new = [fname(1:end-4), '.mat'];
  46. load( fname_new );
  47. [Matriz_Q, Matriz_Error_Length, Axon_Real_Length, Matriz_Estimated_Length] = Sgript_Estim_Long_Axon_Estereo_PLANOS ( AXON_Cell, AXON, Distancias_Entre_Planos, Step_Lengths, Grosor_Corte, h_Cortes, Sampling_Box_X, Sampling_Box_Y, sampling_box_height );
  48. MATRIZ_Q( :, :, rr, kk ) = Matriz_Q;
  49. MATRIZ_ERROR_LENGTH( :, :, rr, kk ) = Matriz_Error_Length;
  50. AXON_REAL_LENGTH(1, rr) = Axon_Real_Length;
  51. MATRIZ_ESTIMATED_AXON_LENGTH(:, :, rr, kk) = Matriz_Estimated_Length;
  52. clc
  53. toc
  54. % Salvamos los resultados
  55. Path_Data_Save = '/Users/pepo/Google Drive (1)/Cesar Mario Axones/Resultados/';
  56. fname_Save=fullfile(Path_Data_Save, ['Result_Estim_Long_Axon_por_Planos_h_Cortes=', num2str(h_Cortes),'_', Path_Data_File_1(2:end-4)]);
  57. save( fname_Save, 'h_Cortes', 'Grosor_Corte', 'sampling_box_height', 'Sampling_Box_X', 'Sampling_Box_Y', 'Distancias_Entre_Planos', 'Step_Lengths', 'MATRIZ_Q', 'MATRIZ_ERROR_LENGTH', 'AXON_REAL_LENGTH', 'MATRIZ_ESTIMATED_AXON_LENGTH' );
  58. disp(rr)
  59. end
  60. disp(kk)
  61. end
  62. % %% Salvamos los resultados
  63. %
  64. % clc
  65. %
  66. % Path_Data_Save = '/Users/pepo/Google Drive (1)/Cesar Mario Axones/Resultados/';
  67. % fname_Save=fullfile(Path_Data_Save, ['Result_Estim_Long_Axon_por_Planos_h_Cortes=', num2str(h_Cortes),'_', Path_Data_File_1(2:end-4)]);
  68. % save( fname_Save );
  69. %%
  70. %% Ploteamos las medias y std de los errores
  71. clc
  72. Saturacion = 100; % A partir de este error (%) saturamos la matriz
  73. Matriz_Error_Length_MEAN_SATURADA = mean(abs(squeeze(MATRIZ_ERROR_LENGTH)), 3);
  74. Matriz_Error_Length_MEAN_SATURADA( Matriz_Error_Length_MEAN_SATURADA >= Saturacion ) = Saturacion;
  75. Matriz_Error_Length_STD_SATURADA = std(abs(squeeze(MATRIZ_ERROR_LENGTH)), 0, 3);
  76. Matriz_Error_Length_STD_SATURADA( Matriz_Error_Length_STD_SATURADA >= Saturacion ) = Saturacion;
  77. figure('color', 'w', 'position', [50, 200, 1100, 400]);
  78. % figure('color', 'w', 'position', [50, 200, 560, 500]);
  79. % suptitle(Path_Data_File_1(2:end-4));
  80. subplot(1, 2, 1);
  81. % imagesc(Matriz_Error_Length_MEAN_SATURADA);
  82. % yticklabels({ '70', '80', '90', '100', '110', '120', '130', '140', '150' });
  83. contourf(flipud(Matriz_Error_Length_MEAN_SATURADA), 10);
  84. yticklabels(fliplr({ '70', '80', '90', '100', '110', '120', '130', '140', '150' }));
  85. % xticklabels({ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' });
  86. % xticklabels({ '2', '4', '6', '8', '10', '12', '14', '16', '18', '20' });
  87. xticklabels({ '3', '6', '9', '12', '15', '18', '21', '24', '27', '30' });
  88. xlabel('Dist between Planes', 'fontsize', 18);
  89. ylabel('Step Length', 'fontsize', 18);
  90. title('Virtual Plane Mean Error Length (%)', 'fontsize', 15);
  91. % title('Length Estim Error (Virtual Planes) (%)', 'fontsize', 15);
  92. colorbar
  93. subplot(1, 2, 2);
  94. % imagesc(Matriz_Error_Length_STD_SATURADA);
  95. % yticklabels({ '70', '80', '90', '100', '110', '120', '130', '140', '150' });
  96. contourf(flipud(Matriz_Error_Length_STD_SATURADA), 10);
  97. yticklabels(fliplr({ '70', '80', '90', '100', '110', '120', '130', '140', '150' }));
  98. % xticklabels({ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' });
  99. % xticklabels({ '2', '4', '6', '8', '10', '12', '14', '16', '18', '20' });
  100. xticklabels({ '3', '6', '9', '12', '15', '18', '21', '24', '27', '30' });
  101. xlabel('Dist between Planes', 'fontsize', 18);
  102. ylabel('Step Length', 'fontsize', 18);
  103. title('Virtual Plane STD Error Length (%)', 'fontsize', 15);
  104. colorbar
  105. %% Ploteamos las medias y std de las intersecciones
  106. clc
  107. Matriz_Inters_MEAN = mean((MATRIZ_Q), 3);
  108. Matriz_Inters_STD = std((MATRIZ_Q), 0, 3);
  109. figure('color', 'w', 'position', [50, 200, 1100, 400]);
  110. suptitle(Path_Data_File_1(2:end-4));
  111. subplot(1, 2, 1);
  112. imagesc(Matriz_Inters_MEAN);
  113. xticklabels({ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' });
  114. % xticklabels({ '2', '4', '6', '8', '10', '12', '14', '16', '18', '20' });
  115. % xticklabels({ '3', '6', '9', '12', '15', '18', '21', '24', '27', '30' });
  116. yticklabels({ '70', '80', '90', '100', '110', '120', '130', '140', '150' });
  117. xlabel('Dist between Planes', 'fontsize', 18);
  118. ylabel('Step Length', 'fontsize', 18);
  119. title('Mean Intersections (%)', 'fontsize', 15);
  120. colorbar
  121. subplot(1, 2, 2);
  122. imagesc(Matriz_Inters_STD);
  123. xticklabels({ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' });
  124. % xticklabels({ '2', '4', '6', '8', '10', '12', '14', '16', '18', '20' });
  125. % xticklabels({ '3', '6', '9', '12', '15', '18', '21', '24', '27', '30' });
  126. yticklabels({ '70', '80', '90', '100', '110', '120', '130', '140', '150' });
  127. xlabel('Dist between Planes', 'fontsize', 18);
  128. ylabel('Step Length', 'fontsize', 18);
  129. title('STD Intersections (%)', 'fontsize', 15);
  130. colorbar
  131. %%
  132. figure;
  133. imagesc(abs(Matriz_Error_Length));
  134. xticklabels({ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' });
  135. yticklabels({ '70', '80', '90', '100', '110', '120', '130', '140', '150' });
  136. xlabel('Dist between Planes', 'fontsize', 18);
  137. ylabel('Step Length', 'fontsize', 18);
  138. title('Virtual Plane Mean Error Length (%)', 'fontsize', 15);
  139. % title('Length Estim Error (Virtual Planes) (%)', 'fontsize', 15);
  140. colorbar
  141. %% Exploramos la distribución de los errores e intersecciones en diferentes corrdenadas [e, d]
  142. ind_e = 9;
  143. ind_d = 10;
  144. num_bins = 15;
  145. Distrib_Error_Length = MATRIZ_ERROR_LENGTH(ind_e, ind_d, :);
  146. Distrib_Q = MATRIZ_Q(ind_e, ind_d, :);
  147. figure('color', 'w', 'position', [50, 200, 1100, 400]);
  148. subplot(1, 2, 1);
  149. histogram( Distrib_Error_Length, num_bins, 'facecolor', 'k', 'normalization', 'probability' );
  150. xlabel('Error Length (%)', 'fontsize', 16);
  151. % ylim([0, 0.2]);
  152. % xlim([-25, 25]);
  153. title(['Steph Length = ', num2str(Step_Lengths(ind_e)), '. Dist between Planes = ', num2str(Distancias_Entre_Planos(ind_d))]);
  154. subplot(1, 2, 2);
  155. histogram( Distrib_Q, num_bins, 'facecolor', 'b', 'normalization', 'probability' );
  156. xlabel('Intersections', 'fontsize', 16);
  157. % ylim([0, 0.2]);
  158. % xlim([-25, 25]);
  159. title(['Steph Length = ', num2str(Step_Lengths(ind_e)), '. Dist between Planes = ', num2str(Distancias_Entre_Planos(ind_d))]);
  160. %% Ploteamos
  161. rr = 46;
  162. fname=fullfile(Path_Data_1, [names_1{rr}]);
  163. fname_new = [fname(1:end-4), '.mat'];
  164. load( fname_new );
  165. %%
  166. clc
  167. corte = 6;
  168. colores = {'r', 'b', 'm', 'k', 'g'};
  169. figure;
  170. suptitle(names_1{rr});
  171. hold on;
  172. for i = 1:corte
  173. Puntos_Axon = AXON_Cell{1, i};
  174. plot3( Puntos_Axon(:, 1), Puntos_Axon(:, 2), Puntos_Axon(:, 3), '-r', 'linewidth', 1.5 );
  175. end
  176. for i = corte+1:length(AXON_Cell)
  177. Puntos_Axon = AXON_Cell{1, i};
  178. plot3( Puntos_Axon(:, 1), Puntos_Axon(:, 2), Puntos_Axon(:, 3), '-k', 'linewidth', 1.5 );
  179. xlabel('X');
  180. ylabel('Y');
  181. zlabel('Z');
  182. % zlim([150 200]);
  183. % view([-96, -90]);
  184. axis equal
  185. end
  186. %%
  187. clc
  188. h_Cortes = 1; % Analizamos un corte cada 'h_Cortes' cortes de la muestra
  189. Grosor_Corte = 50; % En micras
  190. % El 'frame' es la sampling box en la que se introduce la esfera; esa caja luego se introduce en la celda de la rejilla en que se ha dividido el corte.
  191. sampling_box_height = Grosor_Corte; % en micras
  192. Sampling_Box_X = Grosor_Corte; % en micras
  193. Sampling_Box_Y = Grosor_Corte; % en micras
  194. Distancias_Entre_Planos = 50; % Vector con los diámetros de la sonda a considerar. En micras
  195. Step_Lengths = 150; % Vector con los step lengths a considerar. En micras
  196. AXON_Cell_0 = AXON_Cell(1, 7:end);
  197. AXON_0 = AXON(88:end, :);
  198. % for rr = [101, 102, 106, 110]
  199. tic
  200. % Leemos los archivos
  201. fname=fullfile(Path_Data_1, [names_1{rr}]);
  202. fname_new = [fname(1:end-4), '.mat'];
  203. load( fname_new );
  204. [Matriz_Q, Matriz_Error_Length, Axon_Real_Length, Estimated_Axon_Length, Filas_Centros, Columnas_Centros, Z_Centros] = Sgript_Estim_Long_Axon_Estereo ( AXON_Cell_0, AXON_0, Distancias_Entre_Planos, Step_Lengths, Grosor_Corte, h_Cortes, Sampling_Box_X, Sampling_Box_Y, sampling_box_height );
  205. MATRIZ_Q( :, :, rr ) = Matriz_Q;
  206. MATRIZ_ERROR_LENGTH( :, :, rr ) = Matriz_Error_Length;
  207. AXON_REAL_LENGTH(1, rr) = Axon_Real_Length;
  208. clc
  209. toc
  210. %%
  211. rr = 46;
  212. Saturacion = 100; % A partir de este error (%) saturamos la matriz
  213. Matriz_Error_Length_SATURADA = abs(MATRIZ_ERROR_LENGTH(:, :, rr));
  214. Matriz_Error_Length_SATURADA( Matriz_Error_Length_SATURADA >= Saturacion ) = Saturacion;
  215. Matriz_Q_Dummy = abs(MATRIZ_Q(:, :, rr));
  216. figure('color', 'w', 'position', [50, 200, 1100, 400]);
  217. suptitle(names_1{rr});
  218. subplot(1, 2, 1);
  219. imagesc(Matriz_Error_Length_SATURADA);
  220. xticklabels({ '10', '15', '20', '25', '30', '35', '40', '45', '50' });
  221. yticklabels({ '70', '80', '90', '100', '110', '120', '130', '140', '150' });
  222. xlabel('Probe Diameter', 'fontsize', 18);
  223. ylabel('Step Length', 'fontsize', 18);
  224. title('Error Length (%)', 'fontsize', 15);
  225. colorbar
  226. subplot(1, 2, 2);
  227. imagesc(Matriz_Q_Dummy);
  228. xticklabels({ '10', '15', '20', '25', '30', '35', '40', '45', '50' });
  229. yticklabels({ '70', '80', '90', '100', '110', '120', '130', '140', '150' });
  230. xlabel('Probe Diameter', 'fontsize', 18);
  231. ylabel('Step Length', 'fontsize', 18);
  232. title('Number of Intersections', 'fontsize', 15);
  233. colorbar
  234. %% Ploteamos el axón con las esferas
  235. clc
  236. [x,y,z] = sphere;
  237. rad_sonda = Distancias_Entre_Planos/2;
  238. figure;
  239. hold on;
  240. for i = 1:length(AXON_Cell)
  241. Puntos_Axon = AXON_Cell{1, i};
  242. plot3( Puntos_Axon(:, 1), Puntos_Axon(:, 2), Puntos_Axon(:, 3), '-k', 'markersize', 10, 'linewidth', 1.5 );
  243. xlabel('X');
  244. ylabel('Y');
  245. zlabel('Z');
  246. % zlim([150 200]);
  247. % view([-96, -90]);
  248. axis equal
  249. end
  250. % Esferas
  251. for i_x = Columnas_Centros % Columna de la rejilla
  252. for i_y = Filas_Centros % Fila de la rejilla
  253. for i_z = 1:h_Cortes:length(Z_Centros) % Corte
  254. surf( rad_sonda*x + i_x, rad_sonda*y + i_y, rad_sonda*z + Z_Centros(i_z),'FaceAlpha',0.9,'EdgeColor','none' );
  255. end
  256. end
  257. end
  258. %% Para chequear
  259. clc
  260. for j=ind_CORTE
  261. % j=437
  262. [row_a, col_a] = find(~cellfun(@isempty, dummy_CORTE{1, j})); % para cada rama estos son los índices de las celdas de ese corte en el que aparecen dichas ramas
  263. % disp([row_a, col_a]);
  264. %
  265. k = 2;
  266. if length(row_a)>1
  267. dummy_a = dummy_CORTE{1, j}{row_a(k), col_a(k)}; % Coordenadas de los puntos de la rama cuya intersección estamos estudiando
  268. % Obtenemos las distancias al centro de la sonda esférica:
  269. dist_centro_sonda = sqrt( ( dummy_a(:, 1) - Columnas_Centros(col_a(k)) ).^2 + ( dummy_a(:, 2) - Filas_Centros(row_a(k)) ).^2 +...
  270. ( dummy_a(:, 3) - Z_Centros(i) ).^2 );
  271. num_inters = sum( abs( diff( dist_centro_sonda <= rad_sonda ) ) );
  272. if num_inters > 3
  273. disp(j)
  274. end
  275. end
  276. end
  277. %% Comprobamos que está bien, ploteando rama a rama:
  278. [x,y,z] = sphere;
  279. % clc
  280. i_x = col_a(k); % Columna de la rejilla
  281. i_y = row_a(k); % Fila de la rejilla
  282. i_z = i; % Corte
  283. colores = {'r', 'b', 'm', 'k', 'g'};
  284. figure('color', 'w', 'position', [250, 200, 700, 600]);
  285. hold on
  286. % for iii = 1:length(Cortes_XY_Axon{i_z, 1})
  287. for iii = ind_CORTE
  288. if ~isempty( Cortes_XY_Axon{i_z, 1}{1, iii} )
  289. dummy = Cortes_XY_Axon{i_z, 1}{1, iii};
  290. for i_fila = 1:size(dummy, 1)
  291. for i_columna = 1:size(dummy, 2)
  292. if ~isempty(dummy{i_fila, i_columna})
  293. Puntos_Axon = dummy{i_fila, i_columna};
  294. plot3( Puntos_Axon(:, 1), Puntos_Axon(:, 2), Puntos_Axon(:, 3), '-o', 'color', colores{mod(i, 5)+1}, 'markersize', 7, 'linewidth', 1.5 );
  295. end
  296. end
  297. end
  298. end
  299. axis equal
  300. xlim([Columnas_Rejilla(i_x), Columnas_Rejilla(i_x) + Rejilla_X]);
  301. ylim([Filas_Rejilla(i_y), Filas_Rejilla(i_y) + Rejilla_Y]);
  302. zlim([Cortes(i_z), Cortes(i_z) + Grosor_Corte]);
  303. view([32, 20]);
  304. end
  305. surf( rad_sonda*x + Columnas_Centros(col_a(k)), rad_sonda*y + Filas_Centros(row_a(k)), rad_sonda*z + Z_Centros(i) );
  306. alpha 0.7
  307. % surf( rad_sonda*x + Columnas_Centros(i_x), rad_sonda*y + Filas_Centros(i_y), rad_sonda*z + Z_Centros(i_z) );
  308. %% Comprobamos que está bien, ploteando ramas enteras:
  309. [x,y,z] = sphere;
  310. % clc
  311. i_x = 2; % Columna de la rejilla
  312. i_y = 1; % Fila de la rejilla
  313. i_z = 2; % Corte
  314. ind_CORTE = find(~cellfun(@isempty, Cortes_XY_Axon{i_z, 1}));
  315. colores = {'r', 'b', 'm', 'k', 'g'};
  316. figure('color', 'w', 'position', [250, 200, 700, 600]);
  317. hold on
  318. % for iii = 1:length(Cortes_XY_Axon{i_z, 1})
  319. for iii = ind_CORTE
  320. if ~isempty( Cortes_XY_Axon{i_z, 1}{1, iii} )
  321. dummy = Cortes_XY_Axon{i_z, 1}{1, iii};
  322. for i_fila = 1:size(dummy, 1)
  323. for i_columna = 1:size(dummy, 2)
  324. if ~isempty(dummy{i_fila, i_columna})
  325. Puntos_Axon = dummy{i_fila, i_columna};
  326. plot3( Puntos_Axon(:, 1), Puntos_Axon(:, 2), Puntos_Axon(:, 3), '-', 'color', colores{mod(i, 5)+1}, 'markersize', 7, 'linewidth', 1.5 );
  327. end
  328. end
  329. end
  330. end
  331. axis equal
  332. view([32, 20]);
  333. end
  334. surf( rad_sonda*x + Columnas_Centros(i_x), rad_sonda*y + Filas_Centros(i_y), rad_sonda*z + Z_Centros(i_z) );
  335. alpha 0.7
  336. xlabel('X');
  337. ylabel('Y');
  338. zlabel('Z');
  339. % xlim([Columnas_Rejilla(i_x), Columnas_Rejilla(i_x) + Rejilla_X]);
  340. % ylim([Filas_Rejilla(i_y), Filas_Rejilla(i_y) + Rejilla_Y]);
  341. % zlim([Cortes(i_z), Cortes(i_z) + Grosor_Corte]);
  342. % % Para la neurona 5
  343. % xlim([-100, 100]);
  344. % ylim([-200, 0]);
  345. % zlim([-80, 60]);
  346. % % Para la neurona 4
  347. % xlim([-600, 400]);
  348. % ylim([-600, 800]);
  349. % zlim([-200, 700]);
  350. % Para la neurona 3
  351. xlim([-250, 100]);
  352. ylim([-300, 200]);
  353. zlim([-100, 80]);
  354. %%
  355. figure
  356. hold on
  357. surf(peaks(30))
  358. alpha 0.5
  359. plot3(10,10,10,'r*')
  360. hold off
  361. %%