shade the area between curves

2 visualizaciones (últimos 30 días)
Ramina
Ramina el 28 de En. de 2024
Comentada: Matt J el 29 de En. de 2024
Hi,
I am using this code to plot a 2D contour, and I want to shade the area between curves with a colormap like this image:
but I don't know how to do the coloring.
% Define the data as column vectors
x1 = [0.001 0.055178 0.06313 0.071457 0.072486 0.089794 0.099338 0.099518 0.107103 0.118855 0.124411 0.125517 0.128497 0.13175 0.135906 0.141719 0.150846 0.15241 0.156181 0.157533 0.158274 0.159027 0.159401 0.16144 0.162639 0.165307 0.168928 0.172294 0.175054 0.176336 0.182226 0.185355 0.185536 0.191781 0.193506 0.193644 0.197095 0.198207 0.202355 0.204761 0.205134 0.208682 0.210952 0.212751 0.220447 0.22069 0.221403 0.221453 0.221925 0.22572 0.22871 0.230831 0.234085 0.236656 0.240381 0.240835 0.241339 0.242576 0.24507 0.245467 0.24718 0.247336 0.247423 0.253863 0.257667 0.257705 0.259344 0.259667 0.263066 0.268156 0.268795 0.276218 0.277545 0.279455 0.281458 0.283235 0.28604 0.289053 0.294753 0.296227 0.297899 0.299146 0.299616 0.301713 0.302892 0.304464 0.305372 0.305482 0.306944 0.309859 0.31375 0.314905 0.315665 0.315779 0.317846 0.319689 0.324048 0.325627 0.326089 0.327027 0.331245 0.333333 0.338463 0.342653 0.342807 0.349956 0.352732 0.354153 0.354233 0.355341 0.356656 0.35688 0.358447 0.362536 0.363001 0.363558 0.368943 0.369582 0.371092 0.372143 0.37645 0.378771 0.380077 0.380132 0.386161 0.388196 0.390385 0.390621 0.394247 0.394902 0.397471 0.403842 0.405788 0.407323 0.407819 0.408389 0.409127 0.409406 0.411797 0.413571 0.413658 0.413696 0.414003 0.414189 0.417457 0.421655 0.422367 0.424452 0.429382 0.430105 0.434463 0.440018 0.441304 0.445382 0.451221 0.453531 0.454651 0.454782 0.456277 0.456479 0.458572 0.459897 0.466861 0.468297 0.469559 0.470736 0.474025 0.479057 0.479936 0.481312 0.482516 0.482945 0.48406 0.485458 0.485948 0.48662 0.492267 0.494778 0.497505 0.503147 0.503219 0.507627 0.510118 0.510454 0.511309 0.511405 0.512066 0.513327 0.513586 0.515487 0.518519 0.520509 0.525114 0.527776 0.529244 0.539464 0.540359 0.543858 0.550018 0.552908 0.555301 0.55558 0.557271 0.558072 0.559789 0.561135 0.562914 0.565456 0.566109 0.567729 0.573592 0.574495 0.58067 0.58089 0.583212 0.584816 0.590287 0.593941 0.595635 0.596314 0.596888 0.601096 0.601597 0.602476 0.602597 0.612288 0.613492 0.615389 0.622848 0.626066 0.627451 0.629291 0.633198 0.633503 0.636225 0.638458 0.641466 0.644916 0.646269 0.646867 0.647681 0.651326 0.652286 0.656379 0.656401 0.658334 0.668357 0.669856 0.670761 0.678888 0.688307 0.691781 0.692401 0.692511 0.695566 0.698851 0.700808 0.701974 0.70328 0.705366 0.708325 0.712692 0.715572 0.715675 0.721762 0.726429 0.727178 0.728424 0.745073 0.745888 0.746717 0.751663 0.752354 0.760589 0.763589 0.764446 0.77281 0.772814 0.776925 0.777269 0.784132 0.784184 0.786327 0.789535 0.792198 0.800469 0.80659 0.808276 0.816791 0.817857 0.82907 0.83045 0.831508 0.833217 0.833744 0.836159 0.836491 0.851259 0.858238 0.872514 0.876261 0.878046 0.883505 0.884347 0.885493 0.88675 0.888719 0.889479 0.89242 0.898408 0.904162 0.908536 0.92004 0.922416 0.928215 0.935837 0.944559 0.945448 0.969685 0.971511 0.977474 0.980582 0.982367 0.991934 0.994061 0.994775 1.009374 1.011088 1.012684 1.01385 1.017625 1.022223 1.032486 1.033449 1.03551 1.03964 1.040167 1.061826 1.080388 1.09976 1.10007 1.102629 1.1053 1.106862 1.107606 1.124406 1.12696 1.131094 1.138981 1.140703 1.144497 1.151065 1.166858 1.172552 1.177011 1.178204 1.223279 1.236448 1.241236 1.242214 1.248826 1.262489 1.264112 1.272031 1.292503 1.294582 1.298205 1.312618 1.336398 1.377382 1.377565 1.389242 1.40336 1.429553 1.439446 1.452684 1.453913 1.495785 1.59275 1.615322 1.642445 1.649464 1.655172 1.732815 1.845444 1.872881 1.921547 2.048443 2.193629
];
x2 = [0.001 0.024607 0.066225 0.072746 0.078309 0.081249 0.083032 0.090623 0.098684 0.100268 0.109493 0.11194 0.117734 0.122488 0.122677 0.127789 0.131579 0.13245 0.135955 0.142909 0.145108 0.145285 0.15061 0.155311 0.156716 0.162417 0.163934 0.167994 0.169242 0.170077 0.179094 0.179678 0.180129 0.181751 0.182367 0.182832 0.184028 0.188463 0.188879 0.190058 0.192868 0.196017 0.201361 0.201493 0.201934 0.203791 0.205608 0.209321 0.210354 0.210597 0.211343 0.215299 0.215341 0.215833 0.218347 0.218925 0.220369 0.220751 0.224405 0.225101 0.225146 0.229508 0.230832 0.231087 0.233001 0.233032 0.236679 0.237506 0.237875 0.241802 0.242826 0.243826 0.246269 0.248538 0.249918 0.254513 0.256565 0.258759 0.259503 0.260091 0.265396 0.266264 0.268264 0.269305 0.270585 0.27122 0.272259 0.273357 0.274119 0.279913 0.282044 0.283697 0.284734 0.286275 0.291045 0.291058 0.292918 0.29368 0.294726 0.294783 0.295082 0.298565 0.304935 0.306131 0.307018 0.307383 0.312975 0.315585 0.318251 0.318821 0.320439 0.321188 0.323767 0.326999 0.328995 0.330572 0.33286 0.334362 0.335821 0.337393 0.338649 0.339202 0.339912 0.344368 0.348501 0.350682 0.352221 0.353201 0.357251 0.359541 0.360656 0.365497 0.365701 0.369269 0.371681 0.372363 0.37241 0.372724 0.375276 0.37755 0.378076 0.380597 0.385027 0.38962 0.390559 0.393653 0.400919 0.40143 0.404002 0.404079 0.404807 0.406078 0.407683 0.410118 0.416132 0.418425 0.420322 0.423977 0.425373 0.42623 0.426784 0.427158 0.428228 0.429236 0.430322 0.430738 0.4321 0.435693 0.43628 0.439792 0.443976 0.445402 0.446883 0.450511 0.450547 0.463576 0.463635 0.464684 0.465093 0.465466 0.470149 0.470501 0.471856 0.473506 0.476239 0.476889 0.478293 0.48116 0.482456 0.486062 0.486358 0.488485 0.491803 0.49501 0.495707 0.496247 0.497726 0.499204 0.500157 0.500731 0.50726 0.508424 0.508714 0.508902 0.510534 0.510588 0.511288 0.512975 0.514013 0.51411 0.514925 0.51497 0.521042 0.521685 0.523269 0.52532 0.529502 0.529801 0.531753 0.537023 0.539735 0.540936 0.542887 0.547302 0.551602 0.552051 0.553739 0.557377 0.55824 0.558505 0.565361 0.57018 0.570521 0.572511 0.573951 0.574402 0.577199 0.578686 0.58114 0.582903 0.585703 0.586526 0.587688 0.588077 0.590495 0.590986 0.593538 0.595201 0.598842 0.599415 0.599713 0.601472 0.604403 0.611894 0.612469 0.612995 0.616612 0.622951 0.623483 0.624104 0.6249 0.625133 0.630508 0.635321 0.635688 0.638353 0.640773 0.641156 0.642237 0.642537 0.64381 0.651917 0.656538 0.657574 0.657803 0.657895 0.66155 0.662504 0.662592 0.664628 0.667863 0.66936 0.671199 0.684327 0.685283 0.687426 0.688525 0.693488 0.694229 0.694237 0.699265 0.699354 0.700905 0.701437 0.701545 0.70217 0.709776 0.710422 0.712133 0.712401 0.719113 0.726598 0.729928 0.735296 0.739305 0.741959 0.742729 0.743519 0.745329 0.749018 0.749952 0.754098 0.761804 0.764003 0.775479 0.777033 0.777706 0.780071 0.781388 0.783109 0.786987 0.789482 0.794702 0.798688 0.804032 0.807657 0.808577 0.810453 0.812478 0.817678 0.820831 0.822368 0.827458 0.838741 0.843644 0.845458 0.845672 0.854085 0.856721 0.866562 0.870204 0.874859 0.875005 0.879745 0.880684 0.882767 0.887421 0.891837 0.89583 0.898933 0.905077 0.905538 0.906627 0.910256 0.919861 0.921641 0.922004 0.932153 0.937531 0.937963 0.943643 0.945985 0.955621 0.956956 0.969648 0.972502 0.976404 0.976867 0.992324 0.992973 0.994051 1.000057 1.009222 1.015453 1.019205 1.025565 1.031146 1.03283 1.034771 1.043478 1.062583 1.06262 1.064436 1.06526 1.065784 1.068241 1.075487 1.082605 1.090115 1.100447 1.105336 1.111817 1.118977 1.125109 1.125828 1.142431 1.142952 1.144018 1.15719 1.158017 1.175946 1.187635 1.188805 1.188858 1.203236 1.212389 1.250775 1.255206 1.263554 1.286109 1.322055 1.339919 1.342944 1.343532 1.343852 1.396272 1.45162 1.486921 1.497031 1.536886 1.639687 1.651117 1.651787 1.733853 1.827753 1.93082 2.01582 2.127787 2.203886 2.324754
];
x3 = [0.001 0.054776 0.064066 0.073357 0.082647 0.091937 0.095594 0.101228 0.110518 0.119763 0.119809 0.125604 0.129099 0.138389 0.149511 0.152068 0.155615 0.160934 0.172697 0.173208 0.175357 0.178316 0.183413 0.185625 0.200918 0.202104 0.207122 0.211337 0.212743 0.215636 0.220245 0.229571 0.235927 0.240177 0.24121 0.242828 0.243275 0.245646 0.245746 0.246634 0.247318 0.247396 0.247396 0.247588 0.248269 0.254666 0.259835 0.264732 0.269966 0.275138 0.275657 0.277176 0.280849 0.283298 0.284445 0.288421 0.293538 0.29562 0.296942 0.304594 0.305667 0.305801 0.31495 0.316562 0.318713 0.319279 0.319821 0.320059 0.320729 0.322343 0.32277 0.325616 0.326137 0.326591 0.327745 0.332944 0.335678 0.336635 0.341024 0.34297 0.348955 0.351149 0.353707 0.355259 0.356598 0.365688 0.366787 0.377885 0.379893 0.379954 0.38179 0.38203 0.382312 0.390321 0.391239 0.393012 0.393485 0.39403 0.397037 0.399794 0.403386 0.405518 0.407957 0.40876 0.410472 0.411296 0.417062 0.418491 0.418604 0.422531 0.42308 0.424775 0.426404 0.42655 0.42722 0.434652 0.437672 0.4407 0.449128 0.449675 0.453753 0.45826 0.4632 0.463964 0.464514 0.466387 0.46691 0.467236 0.46733 0.476818 0.485023 0.485168 0.485261 0.490298 0.492324 0.492951 0.493613 0.49638 0.49918 0.500573 0.504039 0.512942 0.515834 0.517037 0.518415 0.518575 0.518935 0.524001 0.526218 0.527218 0.52828 0.532374 0.53449 0.536538 0.539356 0.540336 0.540631 0.545417 0.547416 0.552293 0.553275 0.553842 0.556527 0.561128 0.566524 0.576806 0.579129 0.579725 0.580766 0.582542 0.584399 0.589587 0.600421 0.605437 0.61072 0.612953 0.613751 0.613762 0.613932 0.621381 0.621908 0.626031 0.626699 0.627076 0.629304 0.630317 0.630866 0.634981 0.637531 0.638656 0.640834 0.644385 0.646526 0.647999 0.648549 0.65105 0.651762 0.657258 0.664512 0.665934 0.666564 0.668092 0.675135 0.679537 0.686695 0.686949 0.687187 0.687232 0.689488 0.690523 0.694295 0.696677 0.697481 0.700446 0.701145 0.705134 0.70789 0.709086 0.712912 0.713218 0.715536 0.717261 0.719124 0.724872 0.725844 0.744805 0.746481 0.75274 0.756514 0.757594 0.759519 0.760533 0.760613 0.760683 0.761479 0.762733 0.763179 0.765658 0.774882 0.783056 0.784914 0.786486 0.792933 0.79594 0.796119 0.799646 0.803509 0.804421 0.806867 0.809165 0.813657 0.824518 0.825658 0.825701 0.82845 0.829084 0.833833 0.834038 0.839409 0.839545 0.841061 0.84623 0.849018 0.853849 0.861937 0.862245 0.866502 0.870911 0.87222 0.87425 0.87902 0.884301 0.884632 0.889189 0.898714 0.899757 0.902793 0.906085 0.907134 0.908368 0.910419 0.915638 0.918113 0.925471 0.92635 0.927039 0.931778 0.934623 0.937317 0.937803 0.938961 0.940908 0.947778 0.953364 0.958514 0.961921 0.962634 0.972593 0.97649 0.980435 0.985125 0.985446 0.995092 0.996421 1.00653 1.007123 1.013156 1.017326 1.022546 1.024044 1.025284 1.036689 1.044822 1.04721 1.052651 1.052732 1.05317 1.073306 1.076349 1.081898 1.086478 1.090049 1.090427 1.09251 1.099961 1.113518 1.121231 1.121758 1.125098 1.127723 1.128429 1.129945 1.14554 1.146378 1.150171 1.164555 1.167382 1.174462 1.181856 1.185763 1.185842 1.188228 1.196466 1.199218 1.202467 1.210624 1.211988 1.216019 1.224911 1.226505 1.250328 1.252768 1.257337 1.27021 1.276379 1.280477 1.280882 1.287554 1.306454 1.318486 1.323285 1.345784 1.347641 1.350139 1.350671 1.352786 1.360501 1.368245 1.372226 1.37559 1.391974 1.393443 1.394042 1.407725 1.410348 1.411121 1.440007 1.458342 1.484259 1.484605 1.489353 1.491433 1.49235 1.494497 1.498412 1.50944 1.517874 1.527897 1.529549 1.534023 1.592055 1.599131 1.628492 1.633778 1.63884 1.638916 1.64778 1.648069 1.66438 1.671239 1.688733 1.699801 1.758255 1.831323 1.833038 1.837327 1.865578 1.867333 1.875581 1.884439 1.892862 1.994837 2.010273 2.031356 2.070591 2.095825 2.09699 2.117385 2.121098 2.156636
];
y1= [20, 26];
y2 = [25, 31];
y3 = [30, 45];
% Fit a lognormal distribution to the data
pd1 = fitdist(x1', 'Lognormal');
pd2 = fitdist(x2', 'Lognormal');
pd3 = fitdist(x3', 'Lognormal');
% Create a grid of x values using meshgrid
[X1, Y1] = meshgrid(x1 , y1);
[X2, Y2] = meshgrid(x2 , y2);
[X3, Y3] = meshgrid(x3 , y3);
% Compute the CDF at each point on the grid
Z1 = cdf(pd1, X1);
Z2 = cdf(pd2, X2);
Z3 = cdf(pd3, X3);
% Create a 2D plot with the x and z axis of the 3D plot
figure;
[C1, h1] = contour(X1, Z1, Y1);
%clabel(C1, h1);
hold on;
[C2, h2] = contour(X2, Z2, Y2);
%clabel(C2, h2);
[C3, h3] = contour(X3, Z3, Y3);
%clabel(C3, h3);
xlabel('X-axis');
ylabel('Z-axis');
title('2D plot');
colorbar;
hold off;
Thank you for your help.

Respuestas (2)

Matt J
Matt J el 29 de En. de 2024
Editada: Matt J el 29 de En. de 2024
% Define the data as column vectors
x1 = [0.001 0.055178 0.06313 0.071457 0.072486 0.089794 0.099338 0.099518 0.107103 0.118855 0.124411 0.125517 0.128497 0.13175 0.135906 0.141719 0.150846 0.15241 0.156181 0.157533 0.158274 0.159027 0.159401 0.16144 0.162639 0.165307 0.168928 0.172294 0.175054 0.176336 0.182226 0.185355 0.185536 0.191781 0.193506 0.193644 0.197095 0.198207 0.202355 0.204761 0.205134 0.208682 0.210952 0.212751 0.220447 0.22069 0.221403 0.221453 0.221925 0.22572 0.22871 0.230831 0.234085 0.236656 0.240381 0.240835 0.241339 0.242576 0.24507 0.245467 0.24718 0.247336 0.247423 0.253863 0.257667 0.257705 0.259344 0.259667 0.263066 0.268156 0.268795 0.276218 0.277545 0.279455 0.281458 0.283235 0.28604 0.289053 0.294753 0.296227 0.297899 0.299146 0.299616 0.301713 0.302892 0.304464 0.305372 0.305482 0.306944 0.309859 0.31375 0.314905 0.315665 0.315779 0.317846 0.319689 0.324048 0.325627 0.326089 0.327027 0.331245 0.333333 0.338463 0.342653 0.342807 0.349956 0.352732 0.354153 0.354233 0.355341 0.356656 0.35688 0.358447 0.362536 0.363001 0.363558 0.368943 0.369582 0.371092 0.372143 0.37645 0.378771 0.380077 0.380132 0.386161 0.388196 0.390385 0.390621 0.394247 0.394902 0.397471 0.403842 0.405788 0.407323 0.407819 0.408389 0.409127 0.409406 0.411797 0.413571 0.413658 0.413696 0.414003 0.414189 0.417457 0.421655 0.422367 0.424452 0.429382 0.430105 0.434463 0.440018 0.441304 0.445382 0.451221 0.453531 0.454651 0.454782 0.456277 0.456479 0.458572 0.459897 0.466861 0.468297 0.469559 0.470736 0.474025 0.479057 0.479936 0.481312 0.482516 0.482945 0.48406 0.485458 0.485948 0.48662 0.492267 0.494778 0.497505 0.503147 0.503219 0.507627 0.510118 0.510454 0.511309 0.511405 0.512066 0.513327 0.513586 0.515487 0.518519 0.520509 0.525114 0.527776 0.529244 0.539464 0.540359 0.543858 0.550018 0.552908 0.555301 0.55558 0.557271 0.558072 0.559789 0.561135 0.562914 0.565456 0.566109 0.567729 0.573592 0.574495 0.58067 0.58089 0.583212 0.584816 0.590287 0.593941 0.595635 0.596314 0.596888 0.601096 0.601597 0.602476 0.602597 0.612288 0.613492 0.615389 0.622848 0.626066 0.627451 0.629291 0.633198 0.633503 0.636225 0.638458 0.641466 0.644916 0.646269 0.646867 0.647681 0.651326 0.652286 0.656379 0.656401 0.658334 0.668357 0.669856 0.670761 0.678888 0.688307 0.691781 0.692401 0.692511 0.695566 0.698851 0.700808 0.701974 0.70328 0.705366 0.708325 0.712692 0.715572 0.715675 0.721762 0.726429 0.727178 0.728424 0.745073 0.745888 0.746717 0.751663 0.752354 0.760589 0.763589 0.764446 0.77281 0.772814 0.776925 0.777269 0.784132 0.784184 0.786327 0.789535 0.792198 0.800469 0.80659 0.808276 0.816791 0.817857 0.82907 0.83045 0.831508 0.833217 0.833744 0.836159 0.836491 0.851259 0.858238 0.872514 0.876261 0.878046 0.883505 0.884347 0.885493 0.88675 0.888719 0.889479 0.89242 0.898408 0.904162 0.908536 0.92004 0.922416 0.928215 0.935837 0.944559 0.945448 0.969685 0.971511 0.977474 0.980582 0.982367 0.991934 0.994061 0.994775 1.009374 1.011088 1.012684 1.01385 1.017625 1.022223 1.032486 1.033449 1.03551 1.03964 1.040167 1.061826 1.080388 1.09976 1.10007 1.102629 1.1053 1.106862 1.107606 1.124406 1.12696 1.131094 1.138981 1.140703 1.144497 1.151065 1.166858 1.172552 1.177011 1.178204 1.223279 1.236448 1.241236 1.242214 1.248826 1.262489 1.264112 1.272031 1.292503 1.294582 1.298205 1.312618 1.336398 1.377382 1.377565 1.389242 1.40336 1.429553 1.439446 1.452684 1.453913 1.495785 1.59275 1.615322 1.642445 1.649464 1.655172 1.732815 1.845444 1.872881 1.921547 2.048443 2.193629
];
x2 = [0.001 0.024607 0.066225 0.072746 0.078309 0.081249 0.083032 0.090623 0.098684 0.100268 0.109493 0.11194 0.117734 0.122488 0.122677 0.127789 0.131579 0.13245 0.135955 0.142909 0.145108 0.145285 0.15061 0.155311 0.156716 0.162417 0.163934 0.167994 0.169242 0.170077 0.179094 0.179678 0.180129 0.181751 0.182367 0.182832 0.184028 0.188463 0.188879 0.190058 0.192868 0.196017 0.201361 0.201493 0.201934 0.203791 0.205608 0.209321 0.210354 0.210597 0.211343 0.215299 0.215341 0.215833 0.218347 0.218925 0.220369 0.220751 0.224405 0.225101 0.225146 0.229508 0.230832 0.231087 0.233001 0.233032 0.236679 0.237506 0.237875 0.241802 0.242826 0.243826 0.246269 0.248538 0.249918 0.254513 0.256565 0.258759 0.259503 0.260091 0.265396 0.266264 0.268264 0.269305 0.270585 0.27122 0.272259 0.273357 0.274119 0.279913 0.282044 0.283697 0.284734 0.286275 0.291045 0.291058 0.292918 0.29368 0.294726 0.294783 0.295082 0.298565 0.304935 0.306131 0.307018 0.307383 0.312975 0.315585 0.318251 0.318821 0.320439 0.321188 0.323767 0.326999 0.328995 0.330572 0.33286 0.334362 0.335821 0.337393 0.338649 0.339202 0.339912 0.344368 0.348501 0.350682 0.352221 0.353201 0.357251 0.359541 0.360656 0.365497 0.365701 0.369269 0.371681 0.372363 0.37241 0.372724 0.375276 0.37755 0.378076 0.380597 0.385027 0.38962 0.390559 0.393653 0.400919 0.40143 0.404002 0.404079 0.404807 0.406078 0.407683 0.410118 0.416132 0.418425 0.420322 0.423977 0.425373 0.42623 0.426784 0.427158 0.428228 0.429236 0.430322 0.430738 0.4321 0.435693 0.43628 0.439792 0.443976 0.445402 0.446883 0.450511 0.450547 0.463576 0.463635 0.464684 0.465093 0.465466 0.470149 0.470501 0.471856 0.473506 0.476239 0.476889 0.478293 0.48116 0.482456 0.486062 0.486358 0.488485 0.491803 0.49501 0.495707 0.496247 0.497726 0.499204 0.500157 0.500731 0.50726 0.508424 0.508714 0.508902 0.510534 0.510588 0.511288 0.512975 0.514013 0.51411 0.514925 0.51497 0.521042 0.521685 0.523269 0.52532 0.529502 0.529801 0.531753 0.537023 0.539735 0.540936 0.542887 0.547302 0.551602 0.552051 0.553739 0.557377 0.55824 0.558505 0.565361 0.57018 0.570521 0.572511 0.573951 0.574402 0.577199 0.578686 0.58114 0.582903 0.585703 0.586526 0.587688 0.588077 0.590495 0.590986 0.593538 0.595201 0.598842 0.599415 0.599713 0.601472 0.604403 0.611894 0.612469 0.612995 0.616612 0.622951 0.623483 0.624104 0.6249 0.625133 0.630508 0.635321 0.635688 0.638353 0.640773 0.641156 0.642237 0.642537 0.64381 0.651917 0.656538 0.657574 0.657803 0.657895 0.66155 0.662504 0.662592 0.664628 0.667863 0.66936 0.671199 0.684327 0.685283 0.687426 0.688525 0.693488 0.694229 0.694237 0.699265 0.699354 0.700905 0.701437 0.701545 0.70217 0.709776 0.710422 0.712133 0.712401 0.719113 0.726598 0.729928 0.735296 0.739305 0.741959 0.742729 0.743519 0.745329 0.749018 0.749952 0.754098 0.761804 0.764003 0.775479 0.777033 0.777706 0.780071 0.781388 0.783109 0.786987 0.789482 0.794702 0.798688 0.804032 0.807657 0.808577 0.810453 0.812478 0.817678 0.820831 0.822368 0.827458 0.838741 0.843644 0.845458 0.845672 0.854085 0.856721 0.866562 0.870204 0.874859 0.875005 0.879745 0.880684 0.882767 0.887421 0.891837 0.89583 0.898933 0.905077 0.905538 0.906627 0.910256 0.919861 0.921641 0.922004 0.932153 0.937531 0.937963 0.943643 0.945985 0.955621 0.956956 0.969648 0.972502 0.976404 0.976867 0.992324 0.992973 0.994051 1.000057 1.009222 1.015453 1.019205 1.025565 1.031146 1.03283 1.034771 1.043478 1.062583 1.06262 1.064436 1.06526 1.065784 1.068241 1.075487 1.082605 1.090115 1.100447 1.105336 1.111817 1.118977 1.125109 1.125828 1.142431 1.142952 1.144018 1.15719 1.158017 1.175946 1.187635 1.188805 1.188858 1.203236 1.212389 1.250775 1.255206 1.263554 1.286109 1.322055 1.339919 1.342944 1.343532 1.343852 1.396272 1.45162 1.486921 1.497031 1.536886 1.639687 1.651117 1.651787 1.733853 1.827753 1.93082 2.01582 2.127787 2.203886 2.324754
];
x3 = [0.001 0.054776 0.064066 0.073357 0.082647 0.091937 0.095594 0.101228 0.110518 0.119763 0.119809 0.125604 0.129099 0.138389 0.149511 0.152068 0.155615 0.160934 0.172697 0.173208 0.175357 0.178316 0.183413 0.185625 0.200918 0.202104 0.207122 0.211337 0.212743 0.215636 0.220245 0.229571 0.235927 0.240177 0.24121 0.242828 0.243275 0.245646 0.245746 0.246634 0.247318 0.247396 0.247396 0.247588 0.248269 0.254666 0.259835 0.264732 0.269966 0.275138 0.275657 0.277176 0.280849 0.283298 0.284445 0.288421 0.293538 0.29562 0.296942 0.304594 0.305667 0.305801 0.31495 0.316562 0.318713 0.319279 0.319821 0.320059 0.320729 0.322343 0.32277 0.325616 0.326137 0.326591 0.327745 0.332944 0.335678 0.336635 0.341024 0.34297 0.348955 0.351149 0.353707 0.355259 0.356598 0.365688 0.366787 0.377885 0.379893 0.379954 0.38179 0.38203 0.382312 0.390321 0.391239 0.393012 0.393485 0.39403 0.397037 0.399794 0.403386 0.405518 0.407957 0.40876 0.410472 0.411296 0.417062 0.418491 0.418604 0.422531 0.42308 0.424775 0.426404 0.42655 0.42722 0.434652 0.437672 0.4407 0.449128 0.449675 0.453753 0.45826 0.4632 0.463964 0.464514 0.466387 0.46691 0.467236 0.46733 0.476818 0.485023 0.485168 0.485261 0.490298 0.492324 0.492951 0.493613 0.49638 0.49918 0.500573 0.504039 0.512942 0.515834 0.517037 0.518415 0.518575 0.518935 0.524001 0.526218 0.527218 0.52828 0.532374 0.53449 0.536538 0.539356 0.540336 0.540631 0.545417 0.547416 0.552293 0.553275 0.553842 0.556527 0.561128 0.566524 0.576806 0.579129 0.579725 0.580766 0.582542 0.584399 0.589587 0.600421 0.605437 0.61072 0.612953 0.613751 0.613762 0.613932 0.621381 0.621908 0.626031 0.626699 0.627076 0.629304 0.630317 0.630866 0.634981 0.637531 0.638656 0.640834 0.644385 0.646526 0.647999 0.648549 0.65105 0.651762 0.657258 0.664512 0.665934 0.666564 0.668092 0.675135 0.679537 0.686695 0.686949 0.687187 0.687232 0.689488 0.690523 0.694295 0.696677 0.697481 0.700446 0.701145 0.705134 0.70789 0.709086 0.712912 0.713218 0.715536 0.717261 0.719124 0.724872 0.725844 0.744805 0.746481 0.75274 0.756514 0.757594 0.759519 0.760533 0.760613 0.760683 0.761479 0.762733 0.763179 0.765658 0.774882 0.783056 0.784914 0.786486 0.792933 0.79594 0.796119 0.799646 0.803509 0.804421 0.806867 0.809165 0.813657 0.824518 0.825658 0.825701 0.82845 0.829084 0.833833 0.834038 0.839409 0.839545 0.841061 0.84623 0.849018 0.853849 0.861937 0.862245 0.866502 0.870911 0.87222 0.87425 0.87902 0.884301 0.884632 0.889189 0.898714 0.899757 0.902793 0.906085 0.907134 0.908368 0.910419 0.915638 0.918113 0.925471 0.92635 0.927039 0.931778 0.934623 0.937317 0.937803 0.938961 0.940908 0.947778 0.953364 0.958514 0.961921 0.962634 0.972593 0.97649 0.980435 0.985125 0.985446 0.995092 0.996421 1.00653 1.007123 1.013156 1.017326 1.022546 1.024044 1.025284 1.036689 1.044822 1.04721 1.052651 1.052732 1.05317 1.073306 1.076349 1.081898 1.086478 1.090049 1.090427 1.09251 1.099961 1.113518 1.121231 1.121758 1.125098 1.127723 1.128429 1.129945 1.14554 1.146378 1.150171 1.164555 1.167382 1.174462 1.181856 1.185763 1.185842 1.188228 1.196466 1.199218 1.202467 1.210624 1.211988 1.216019 1.224911 1.226505 1.250328 1.252768 1.257337 1.27021 1.276379 1.280477 1.280882 1.287554 1.306454 1.318486 1.323285 1.345784 1.347641 1.350139 1.350671 1.352786 1.360501 1.368245 1.372226 1.37559 1.391974 1.393443 1.394042 1.407725 1.410348 1.411121 1.440007 1.458342 1.484259 1.484605 1.489353 1.491433 1.49235 1.494497 1.498412 1.50944 1.517874 1.527897 1.529549 1.534023 1.592055 1.599131 1.628492 1.633778 1.63884 1.638916 1.64778 1.648069 1.66438 1.671239 1.688733 1.699801 1.758255 1.831323 1.833038 1.837327 1.865578 1.867333 1.875581 1.884439 1.892862 1.994837 2.010273 2.031356 2.070591 2.095825 2.09699 2.117385 2.121098 2.156636
];
x=union( union(x1,x2), x3);
% Fit a lognormal distribution to the data
pd1 = fitdist(x1', 'Lognormal');
pd2 = fitdist(x2', 'Lognormal');
pd3 = fitdist(x3', 'Lognormal');
Z=[cdf(pd1,x);cdf(pd2,x);cdf(pd3,x)]';
[~,is]=sort(trapz(x,Z));
Z=Z(:,is);
H=area(x,[Z(:,1), diff(Z,1,2)]);
H(1).FaceColor='none';

Image Analyst
Image Analyst el 29 de En. de 2024
  1 comentario
Matt J
Matt J el 29 de En. de 2024
The FAQ recommends patch(). Seems a bit more cumbersome than area(), though probably more flexible.

Iniciar sesión para comentar.

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by