Skip to content

Commit

Permalink
Memory info
Browse files Browse the repository at this point in the history
  • Loading branch information
cultpenguin committed Aug 23, 2022
1 parent 927a123 commit 88f1cc8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions bordley.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
% w=[.1, .1, 1];
% p_com=bordley(p0,[p1;p2;p3],w);
%
% See also, comb_cprob
%
function p_com=bordley(p0,p,w);
if nargin<3, w=1;end
[n,dim]=size(p);
Expand Down
2 changes: 1 addition & 1 deletion colorbar_log10.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function colorbar_log10(Ticks)

cb=colorbar;
if nargin>0
set(cb,'Ticks',log10(Ticks))
set(cb,'Ticks',log10(Ticks));
end
T=get(cb,'Ticks');
for it=1:length(T);TL{it}=sprintf('%3.1f',10.^T(it));end
Expand Down
3 changes: 2 additions & 1 deletion comb_cprob.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
%
% Journel, An Alternative to Traditional Data Independence
% Hypotheses, Math Geol(34), 2002
%
%
% See also comb_cprob_nd, bordley
%
function pAgBC=comb_cprob(pA,pAgB,pAgC,tau)

Expand Down
12 changes: 10 additions & 2 deletions misc/memory_get.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
function [mem_total,mem_used,mem_available]=memory_get();
% memory_get: Get memory inforation on Unix and Windows systems
%
% Call:
% [mem_total,mem_used,mem_available]=memory_get;
%
%
mem_total=[];
mem_used=[];
mem_available=[];
Expand All @@ -8,7 +14,9 @@
mem_total=str2num(ws{2})/1e+6;
mem_used=str2num(ws{3})/1e+6;
mem_available=str2num(ws{4})/1e+6;
else iswin==1
else
[USERVIEW, SYSTEMVIEW] = memory;
mem_total=USERVIEW.MaxPossibleArrayBytes/1024/1E+6;
mem_total=SYSTEMVIEW.PhysicalMemory.Total/1024/1E+6;
mem_available=SYSTEMVIEW.PhysicalMemory.Available/1024/1E+6;
mem_used=mem_total-mem_available;
end

0 comments on commit 88f1cc8

Please sign in to comment.