Добавил:
t.me Фулл всегда есть, ФОЭ ТОЭ ТЭЦ Электроника, КЭТ ИиКГ и тд https://t.me/whitedevil752 Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

lab2 вроде / kbp24

.m
Скачиваний:
3
Добавлен:
26.03.2025
Размер:
1.37 Кб
Скачать
% main_FBF
% INPUTS:
% - 'H' is the Hurst parameter of the Gaussian process
% - 'n' is the number of grid points, where 'n' is a power of 2;
% if the 'n' supplied is not a power of two,
% then we set n=2^ceil(log2(n)); default is n=2^8;
% OUTPUT:
% - two statistically independent fields 'field1' and 'field2'
% over unit disk; if not output requested, then function
% outputs a figure of one of the fields
% - vectors 'tx' and 'ty' so that the field is plotted via
% surf(tx,ty,field1,'EdgeColor','none')
clc
close all
clear all
H = 0.3
n = 2^10 % the number of grid points 1024
STEP = 1
[field1,field2,tx,ty] = func_Brownian_field(H,n);
ntx = size(tx)
[n1,n2] = size(field1) %check size of fields
STEP = 2
BF1 = zeros(256);BF2 = zeros(256);
for i = 1:256
for j = 1:256
BF1(i,j) = field1(i,j);
BF2(i,j) = field2(i,j);
end;
end;
%%%%%%%%%%%%%% Fractal Brownian Fields
i1=[1:i];
figure(21), mesh(BF1), title('BF1 256x256');
figure(22), mesh(BF2), title('BF2 256x256');
figure(31), plot(i1,BF1(i,i1)), title('BF1 256x256');
figure(32), plot(i1,BF2(i,i1)), title('BF2 256x256');
ts = input('STOP_BF','s');
BF11 = mat2gray(BF1); BF22 = mat2gray(BF2);
figure(201),imhist(BF11),title('HistogramBF11');%histogram
figure(202),imhist(BF22),title('HistogramBF22');%histogram
ts = input('STOP_2_BF','s');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
END=0
Соседние файлы в папке lab2 вроде