I want to make some changes in this code please
Show older comments
clear;clc;
img = imread('cameraman.tif');
y = imresize(img,[256 256]);
imshow(y)
tic
timg = img;
r = 3.62;
x(1) = 0.7;
row = size(img,1);
col = size(img,2);
s = row*col;
%Creation of Logistic function
for n=1:s-1
x(n+1) = r*x(n)*(1-x(n));
end
[so,in] = sort(x);
timg = timg(:);
for m = 1:size(timg,1)
t1 = timg(m);
timg(m)=timg(in(m));
timg(in(m))=t1;
please i want to make a change in this code instead of this 1 D equation "x(n+1) = r*x(n)*(1-x(n));" i want to try this 3D equations :
and how can i write "[so,in] = sort(x);" in the new form after applied this three equations? ?
x(1)=0.2350;
y(1)=0.3500;
z(1)=0.7350;
a(1)=0.0125;
b(1)=0.0157;
l(1)=3.7700;
for i=1:1:70000
x(i+1)=l*x(i)*(1-x(i))+b*y(i)*y(i)*x(i)+a*z(i)*z(i)*z(i);
y(i+1)=l*y(i)*(1-y(i))+b*z(i)*z(i)*y(i)+a*x(i)*x(i)*x(i);
z(i+1)=l*z(i)*(1-z(i))+b*x(i)*x(i)*z(i)+a*y(i)*y(i);
end
x=ceil(mod((x*100000),image_height));
y=ceil(mod((y*100000),image_height));
z=ceil(mod((z*100000),image_height));
please any one help me
Answers (0)
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!