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

3 vues (au cours des 30 derniers jours)
Sheri
Sheri le 21 Jan 2023
Commenté : Sheri le 6 Fév 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.

Réponse acceptée

Sulaymon Eshkabilov
Sulaymon Eshkabilov le 21 Jan 2023
Modifié(e) : Sulaymon Eshkabilov le 21 Jan 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 commentaires
Sheri
Sheri le 6 Fév 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 le 6 Fév 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);
>>

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Visual Exploration dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by