%() Error: Illegal use of reserved keyword "end".

3 visualizaciones (últimos 30 días)
Sheri
Sheri el 21 de En. de 2023
Comentada: Sheri el 6 de Feb. de 2023
clc;
clearvars;
close all;
% % % % % % %
% % % % % %
I =imread("moon.tif");
I=imresize(I,[512,512]);
% I=rgb2gray(I);
figure(1);
imshow(I);
% % % % % % % % %
% % % % % % % % Fourth Order PDEs % % % % % % % % % %
T=1.0;
I1=fpdepyou(I,T);
figure; imshow(I,[]); title('Original image');
N = 50; % Number of contaminated realizations
Ic = NaN(size(I,1),size(I,2),N); % 3D matrix that holds the 'N' realizations
sigma = 1.5; % Strandart deviation of the Gaussian distributions
Mult_noise = NaN(size(I)); % Multiplicative noise
%% Contamination of the 'N' realizations:
for ID_realz = 1:N
rng('shuffle');
Mult_noise = (sigma*randn(size(I)))+((1j)*(sigma*randn(size(I))));
Ic(:,:,ID_realz) = abs(I.*Mult_noise);
clear('Mult_noise');
end;
Error using .*
Complex integer arithmetic is not supported.

Respuesta aceptada

Sulaymon Eshkabilov
Sulaymon Eshkabilov el 21 de En. de 2023
Editada: Sulaymon Eshkabilov el 21 de En. de 2023
Here is the corrected part of your code:
...
for ID_realz = 1:N
rng('shuffle');
Mult_noise = (sigma*randn(size(I)))+((1j)*(sigma*randn(size(I))));
Ic(:,:,ID_realz) = double(I).*abs(Mult_noise);
clear('Mult_noise');
end
  2 comentarios
Sheri
Sheri el 6 de Feb. de 2023
Unable to perform assignment
because the size of the left
side is 512-by-512 and the size
of the right side is
512-by-512-by-3.
Sheri
Sheri el 6 de Feb. de 2023
Unable to perform assignment
because the size of the left
side is 512-by-512 and the size
of the right side is
512-by-512-by-3.
Error in six_ferb_4th_OPDE (line 34)
Ic(:,:,ID_realz) = double(I).*abs(Mult_noise);
>>

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Visual Exploration en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by