Tag Archives: matlab
Default data division in trainAutoencoder
Hello,
Can anyone explain why the default data division for the trainAutoencoder function (example usage here Train Stacked Autoencoders for Image Classification) uses the default data division method "dividetrain", i.e., data division is training only, rather than a training/validation/testing one (e.g., dividerand, divideint, etc.)?
Thanks.Hello,
Can anyone explain why the default data division for the trainAutoencoder function (example usage here Train Stacked Autoencoders for Image Classification) uses the default data division method "dividetrain", i.e., data division is training only, rather than a training/validation/testing one (e.g., dividerand, divideint, etc.)?
Thanks. Hello,
Can anyone explain why the default data division for the trainAutoencoder function (example usage here Train Stacked Autoencoders for Image Classification) uses the default data division method "dividetrain", i.e., data division is training only, rather than a training/validation/testing one (e.g., dividerand, divideint, etc.)?
Thanks. autoencoder, data division MATLAB Answers — New Questions
I want to perform this time derivative?
i want to perfrom this time derivative of volume which depends upon Ab and r_dot_L, these factor are calculated before and has an array of (600(time tb) x 412(distance X)) both of the values are time dependent and changes with respect to X.i want to perfrom this time derivative of volume which depends upon Ab and r_dot_L, these factor are calculated before and has an array of (600(time tb) x 412(distance X)) both of the values are time dependent and changes with respect to X. i want to perfrom this time derivative of volume which depends upon Ab and r_dot_L, these factor are calculated before and has an array of (600(time tb) x 412(distance X)) both of the values are time dependent and changes with respect to X. ode45 MATLAB Answers — New Questions
Using a newer version of plot (ezplot to fimplicit or fplot)
See https://uk.mathworks.com/matlabcentral/answers/327895-how-do-i-plot-a-circular-arc-with-given-two-endpoints-and-radius#answer_272169 for context
Using the answers from this question I was able to edit the code from the link above to get the general arc shape that I wanted.
However, I have a few issues, mainly down to my lack of experience:
1) ezplot isn’t recommended for the type of shape, so fplot and fimplicit are suggested as alternatives, and I’m not sure how to change ezplot over and maintain the same arc image
2) I need a functionality to change the thickness of the line which it doesn’t currently have
3) With this code it isn’t necessary but being able to plot multiple similar arcs on the same graph is also important
I’ve looked through the help centre for ezplot, fplot and fimplicit and I’m really not sure where I’m going wrong.
Code is pasted below
sparse.vein = [13 28.5 2 90 45 12.1935; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0];
sparse.cross_vein = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
sf1 = 4;
sf2 = -2;
sf3 = 20;
vein1_p1 = [sf1 * sparse.vein(1,1), sf2 * sparse.vein(1,2)]; %point 1
vein1_p2 = [sf1 * sparse.vein(1,4), sf2 * sparse.vein(1,5)]; %point 2
vein1_r = sf3 * [sparse.vein(1,6)]; %radius value
%vein1_t = line thickness
limA = [0 400];
limB = [-200 0]; % [0 400 -200 0]
%first input
a=vein1_p1; %P1
b=vein1_p2; %P2
r=vein1_r; %radius
%next solution
syms x y
[x,y]=solve((x-a(1))^2+(y-a(2))^2==r^2,(x-b(1))^2+(y-b(2))^2==r^2,x,y);
%plot arc
syms X Y
ezplot((X-x(1))^2+(Y-y(1))^2==r^2,[min(52,360),max(52,360), …
min(-200,0),max(-200,0)])
axis ([0 400 -200 0])
figure
ezplot((X-x(2))^2+(Y-y(2))^2==r^2,[min(52,360),max(52,360), …
min(-200,0),max(-200,0)])
axis ([0 400 -200 0])See https://uk.mathworks.com/matlabcentral/answers/327895-how-do-i-plot-a-circular-arc-with-given-two-endpoints-and-radius#answer_272169 for context
Using the answers from this question I was able to edit the code from the link above to get the general arc shape that I wanted.
However, I have a few issues, mainly down to my lack of experience:
1) ezplot isn’t recommended for the type of shape, so fplot and fimplicit are suggested as alternatives, and I’m not sure how to change ezplot over and maintain the same arc image
2) I need a functionality to change the thickness of the line which it doesn’t currently have
3) With this code it isn’t necessary but being able to plot multiple similar arcs on the same graph is also important
I’ve looked through the help centre for ezplot, fplot and fimplicit and I’m really not sure where I’m going wrong.
Code is pasted below
sparse.vein = [13 28.5 2 90 45 12.1935; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0];
sparse.cross_vein = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
sf1 = 4;
sf2 = -2;
sf3 = 20;
vein1_p1 = [sf1 * sparse.vein(1,1), sf2 * sparse.vein(1,2)]; %point 1
vein1_p2 = [sf1 * sparse.vein(1,4), sf2 * sparse.vein(1,5)]; %point 2
vein1_r = sf3 * [sparse.vein(1,6)]; %radius value
%vein1_t = line thickness
limA = [0 400];
limB = [-200 0]; % [0 400 -200 0]
%first input
a=vein1_p1; %P1
b=vein1_p2; %P2
r=vein1_r; %radius
%next solution
syms x y
[x,y]=solve((x-a(1))^2+(y-a(2))^2==r^2,(x-b(1))^2+(y-b(2))^2==r^2,x,y);
%plot arc
syms X Y
ezplot((X-x(1))^2+(Y-y(1))^2==r^2,[min(52,360),max(52,360), …
min(-200,0),max(-200,0)])
axis ([0 400 -200 0])
figure
ezplot((X-x(2))^2+(Y-y(2))^2==r^2,[min(52,360),max(52,360), …
min(-200,0),max(-200,0)])
axis ([0 400 -200 0]) See https://uk.mathworks.com/matlabcentral/answers/327895-how-do-i-plot-a-circular-arc-with-given-two-endpoints-and-radius#answer_272169 for context
Using the answers from this question I was able to edit the code from the link above to get the general arc shape that I wanted.
However, I have a few issues, mainly down to my lack of experience:
1) ezplot isn’t recommended for the type of shape, so fplot and fimplicit are suggested as alternatives, and I’m not sure how to change ezplot over and maintain the same arc image
2) I need a functionality to change the thickness of the line which it doesn’t currently have
3) With this code it isn’t necessary but being able to plot multiple similar arcs on the same graph is also important
I’ve looked through the help centre for ezplot, fplot and fimplicit and I’m really not sure where I’m going wrong.
Code is pasted below
sparse.vein = [13 28.5 2 90 45 12.1935; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0];
sparse.cross_vein = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
sf1 = 4;
sf2 = -2;
sf3 = 20;
vein1_p1 = [sf1 * sparse.vein(1,1), sf2 * sparse.vein(1,2)]; %point 1
vein1_p2 = [sf1 * sparse.vein(1,4), sf2 * sparse.vein(1,5)]; %point 2
vein1_r = sf3 * [sparse.vein(1,6)]; %radius value
%vein1_t = line thickness
limA = [0 400];
limB = [-200 0]; % [0 400 -200 0]
%first input
a=vein1_p1; %P1
b=vein1_p2; %P2
r=vein1_r; %radius
%next solution
syms x y
[x,y]=solve((x-a(1))^2+(y-a(2))^2==r^2,(x-b(1))^2+(y-b(2))^2==r^2,x,y);
%plot arc
syms X Y
ezplot((X-x(1))^2+(Y-y(1))^2==r^2,[min(52,360),max(52,360), …
min(-200,0),max(-200,0)])
axis ([0 400 -200 0])
figure
ezplot((X-x(2))^2+(Y-y(2))^2==r^2,[min(52,360),max(52,360), …
min(-200,0),max(-200,0)])
axis ([0 400 -200 0]) plot, 2d, arc, radius, between two points MATLAB Answers — New Questions
Image hidding using DWT
Hello every one
I am finding a problime in my code for hidding 325*325 image into 2300*2300 image after decompose it using into HH{3} to get the best PSNR and MSE
and the erroe say that the matrix in not matching.
the code is as follow:-
% Main code
clc
close all;
clear all;
%
a=imgetfile();
coverImage1 = imread(a);
coverImages = imresize(coverImage1,[2600 2600]);
R=coverImages(:,:,1); %red = 1, green = 2, blue = 3
G=coverImages(:,:,2);
B=coverImages(:,:,3);
coverImage=B;
% figure;
% imshow(coverImage);
% title(‘Blue Image’);
%%%%%
b=imgetfile();
secretImage1 = imread(b);
%secretImage=B1;
secretImage= rgb2gray(secretImage1);
secretImage = imresize(secretImage,[1300 1300]);
row = size(secretImage,1);
col = size(secretImage,2);
s = row*col;
%secretImage = imresize(secretImage,[280 280]);
% figure(1); imshow (coverImages)
% figure(2); imshow (secretImage)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Perform DNA encryption on the secret image
key = randi([0, 255], size(secretImage)); % Generate random key
encryptedImage = DNAEncrypt(secretImage, key);
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nColors = 256;
n =3 ; %# Number of decompositions
LL = cell(1,n); %# Approximation coefficient storage
LH = cell(1,n); %# Horizontal detail coefficient storage
HL = cell(1,n); %# Vertical detail coefficient storage
HH = cell(1,n); %# Diagonal detail coefficient storage
X = coverImage ;
for i = 1:n %# %# Apply nLevel decompositions
[LL{i},LH{i},HL{i},HH{i}] = dwt2(X,’Haar’);
X = LL{i}; % gives you the last quarter of the image
end
%coverImage = LL{i}; % gives you the last quarter of the image
%alpha = 0.02; % Embedding strength
OO= HH{1}; OOO = HH{2}; OOOO=HH{3};% here I want to get the need HH{1,2,3} for the good hidding
%%
HH_embedded = HH{1} + ( encryptedImage);
stegoImage = idwt2(LL{i}, LH{i}, HL{i}, HH_embedded, ‘haar’);
imshow(uint8(stegoImage));
% %%
% tiledImage = wcodemat(LL{n},nColors);
% for i = n:-1:1
% tiledImage = cat(1,cat(2,tiledImage,…
% wcodemat(LH{i},nColors)),…
% cat(2,wcodemat(HL{i},nColors),…
% wcodemat(HH{i},nColors)));
% end
% figure(1);imshow(uint8(tiledImage-1));
%%
B2=uint8(stegoImage);
RGB= cat(3, R, G, B2);
stg= double(im2gray(RGB));
% figure (5)
% subplot(1, 2, 1);
% imshow(RGB);
% title(‘RGB after Analysis’);
%%%%
% Display the stego image
figure;
subplot(1, 2, 1);
imshow(coverImages);
title(‘Cover Image’);
subplot(1, 2, 2);
imshow(RGB);
title(‘Stego Image’);
%%%%%%%%%%%%%
%TT = immse(stg, double(coverImage));
mse = sum(sum((coverImage – uint8(stg)) .^ 2)) / numel(coverImage);
% Display the MSE
fprintf(‘Mean Squared Error (MSE): %.4fn’, mse);
%CC = mse(stgcoverImage);
C = psnr((uint8(stg)),coverImage);
%fprintf(‘n The Mean Sq. Erorr value is %0.4f’, CC );
fprintf(‘n PSNR value is %0.6f’, C);
%%
%
I will write the code here and provide you the images, hope to get it downHello every one
I am finding a problime in my code for hidding 325*325 image into 2300*2300 image after decompose it using into HH{3} to get the best PSNR and MSE
and the erroe say that the matrix in not matching.
the code is as follow:-
% Main code
clc
close all;
clear all;
%
a=imgetfile();
coverImage1 = imread(a);
coverImages = imresize(coverImage1,[2600 2600]);
R=coverImages(:,:,1); %red = 1, green = 2, blue = 3
G=coverImages(:,:,2);
B=coverImages(:,:,3);
coverImage=B;
% figure;
% imshow(coverImage);
% title(‘Blue Image’);
%%%%%
b=imgetfile();
secretImage1 = imread(b);
%secretImage=B1;
secretImage= rgb2gray(secretImage1);
secretImage = imresize(secretImage,[1300 1300]);
row = size(secretImage,1);
col = size(secretImage,2);
s = row*col;
%secretImage = imresize(secretImage,[280 280]);
% figure(1); imshow (coverImages)
% figure(2); imshow (secretImage)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Perform DNA encryption on the secret image
key = randi([0, 255], size(secretImage)); % Generate random key
encryptedImage = DNAEncrypt(secretImage, key);
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nColors = 256;
n =3 ; %# Number of decompositions
LL = cell(1,n); %# Approximation coefficient storage
LH = cell(1,n); %# Horizontal detail coefficient storage
HL = cell(1,n); %# Vertical detail coefficient storage
HH = cell(1,n); %# Diagonal detail coefficient storage
X = coverImage ;
for i = 1:n %# %# Apply nLevel decompositions
[LL{i},LH{i},HL{i},HH{i}] = dwt2(X,’Haar’);
X = LL{i}; % gives you the last quarter of the image
end
%coverImage = LL{i}; % gives you the last quarter of the image
%alpha = 0.02; % Embedding strength
OO= HH{1}; OOO = HH{2}; OOOO=HH{3};% here I want to get the need HH{1,2,3} for the good hidding
%%
HH_embedded = HH{1} + ( encryptedImage);
stegoImage = idwt2(LL{i}, LH{i}, HL{i}, HH_embedded, ‘haar’);
imshow(uint8(stegoImage));
% %%
% tiledImage = wcodemat(LL{n},nColors);
% for i = n:-1:1
% tiledImage = cat(1,cat(2,tiledImage,…
% wcodemat(LH{i},nColors)),…
% cat(2,wcodemat(HL{i},nColors),…
% wcodemat(HH{i},nColors)));
% end
% figure(1);imshow(uint8(tiledImage-1));
%%
B2=uint8(stegoImage);
RGB= cat(3, R, G, B2);
stg= double(im2gray(RGB));
% figure (5)
% subplot(1, 2, 1);
% imshow(RGB);
% title(‘RGB after Analysis’);
%%%%
% Display the stego image
figure;
subplot(1, 2, 1);
imshow(coverImages);
title(‘Cover Image’);
subplot(1, 2, 2);
imshow(RGB);
title(‘Stego Image’);
%%%%%%%%%%%%%
%TT = immse(stg, double(coverImage));
mse = sum(sum((coverImage – uint8(stg)) .^ 2)) / numel(coverImage);
% Display the MSE
fprintf(‘Mean Squared Error (MSE): %.4fn’, mse);
%CC = mse(stgcoverImage);
C = psnr((uint8(stg)),coverImage);
%fprintf(‘n The Mean Sq. Erorr value is %0.4f’, CC );
fprintf(‘n PSNR value is %0.6f’, C);
%%
%
I will write the code here and provide you the images, hope to get it down Hello every one
I am finding a problime in my code for hidding 325*325 image into 2300*2300 image after decompose it using into HH{3} to get the best PSNR and MSE
and the erroe say that the matrix in not matching.
the code is as follow:-
% Main code
clc
close all;
clear all;
%
a=imgetfile();
coverImage1 = imread(a);
coverImages = imresize(coverImage1,[2600 2600]);
R=coverImages(:,:,1); %red = 1, green = 2, blue = 3
G=coverImages(:,:,2);
B=coverImages(:,:,3);
coverImage=B;
% figure;
% imshow(coverImage);
% title(‘Blue Image’);
%%%%%
b=imgetfile();
secretImage1 = imread(b);
%secretImage=B1;
secretImage= rgb2gray(secretImage1);
secretImage = imresize(secretImage,[1300 1300]);
row = size(secretImage,1);
col = size(secretImage,2);
s = row*col;
%secretImage = imresize(secretImage,[280 280]);
% figure(1); imshow (coverImages)
% figure(2); imshow (secretImage)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Perform DNA encryption on the secret image
key = randi([0, 255], size(secretImage)); % Generate random key
encryptedImage = DNAEncrypt(secretImage, key);
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nColors = 256;
n =3 ; %# Number of decompositions
LL = cell(1,n); %# Approximation coefficient storage
LH = cell(1,n); %# Horizontal detail coefficient storage
HL = cell(1,n); %# Vertical detail coefficient storage
HH = cell(1,n); %# Diagonal detail coefficient storage
X = coverImage ;
for i = 1:n %# %# Apply nLevel decompositions
[LL{i},LH{i},HL{i},HH{i}] = dwt2(X,’Haar’);
X = LL{i}; % gives you the last quarter of the image
end
%coverImage = LL{i}; % gives you the last quarter of the image
%alpha = 0.02; % Embedding strength
OO= HH{1}; OOO = HH{2}; OOOO=HH{3};% here I want to get the need HH{1,2,3} for the good hidding
%%
HH_embedded = HH{1} + ( encryptedImage);
stegoImage = idwt2(LL{i}, LH{i}, HL{i}, HH_embedded, ‘haar’);
imshow(uint8(stegoImage));
% %%
% tiledImage = wcodemat(LL{n},nColors);
% for i = n:-1:1
% tiledImage = cat(1,cat(2,tiledImage,…
% wcodemat(LH{i},nColors)),…
% cat(2,wcodemat(HL{i},nColors),…
% wcodemat(HH{i},nColors)));
% end
% figure(1);imshow(uint8(tiledImage-1));
%%
B2=uint8(stegoImage);
RGB= cat(3, R, G, B2);
stg= double(im2gray(RGB));
% figure (5)
% subplot(1, 2, 1);
% imshow(RGB);
% title(‘RGB after Analysis’);
%%%%
% Display the stego image
figure;
subplot(1, 2, 1);
imshow(coverImages);
title(‘Cover Image’);
subplot(1, 2, 2);
imshow(RGB);
title(‘Stego Image’);
%%%%%%%%%%%%%
%TT = immse(stg, double(coverImage));
mse = sum(sum((coverImage – uint8(stg)) .^ 2)) / numel(coverImage);
% Display the MSE
fprintf(‘Mean Squared Error (MSE): %.4fn’, mse);
%CC = mse(stgcoverImage);
C = psnr((uint8(stg)),coverImage);
%fprintf(‘n The Mean Sq. Erorr value is %0.4f’, CC );
fprintf(‘n PSNR value is %0.6f’, C);
%%
%
I will write the code here and provide you the images, hope to get it down dwt, image processing MATLAB Answers — New Questions
How to keep the original layout in the full screen or when maximizing the GUI of a MATLAB App ?
Hello everyone,
I am desinging an App in the MATLAB App Designer, I am using MATLAB R2023a, and I am working on a Windows operating system.
After finishing the design of my App, I have noticed that when running the App, the layout of the designed GUI is lost when the GUI is on full screen or when it is maximized. Please see the attached Capture1 and Capture2 for the layouts of the GUI (Capture1 shows the layout when the GUI is minimised, this is the original layout that I have designed, and Capture2 shows how the layout is changed when the GUI is on full screen or when it is maximized).
I want that the GUI keeps the original layout that I have set when I was designing the App in the App designer, when the GUI is on full screen or when it is maximized.
I have found on some answers of MATLAB Central that I Should select for WindowState "fullscreen" or "maximized" and that I should also select "Resize" and "AutoResizeChildren" in the Settings of POSITION. I have done all that, please see the attached Capture3, but I still have the same problem.
Does anyone have any solution for this problem ?
Many thanks to everyone in advance.Hello everyone,
I am desinging an App in the MATLAB App Designer, I am using MATLAB R2023a, and I am working on a Windows operating system.
After finishing the design of my App, I have noticed that when running the App, the layout of the designed GUI is lost when the GUI is on full screen or when it is maximized. Please see the attached Capture1 and Capture2 for the layouts of the GUI (Capture1 shows the layout when the GUI is minimised, this is the original layout that I have designed, and Capture2 shows how the layout is changed when the GUI is on full screen or when it is maximized).
I want that the GUI keeps the original layout that I have set when I was designing the App in the App designer, when the GUI is on full screen or when it is maximized.
I have found on some answers of MATLAB Central that I Should select for WindowState "fullscreen" or "maximized" and that I should also select "Resize" and "AutoResizeChildren" in the Settings of POSITION. I have done all that, please see the attached Capture3, but I still have the same problem.
Does anyone have any solution for this problem ?
Many thanks to everyone in advance. Hello everyone,
I am desinging an App in the MATLAB App Designer, I am using MATLAB R2023a, and I am working on a Windows operating system.
After finishing the design of my App, I have noticed that when running the App, the layout of the designed GUI is lost when the GUI is on full screen or when it is maximized. Please see the attached Capture1 and Capture2 for the layouts of the GUI (Capture1 shows the layout when the GUI is minimised, this is the original layout that I have designed, and Capture2 shows how the layout is changed when the GUI is on full screen or when it is maximized).
I want that the GUI keeps the original layout that I have set when I was designing the App in the App designer, when the GUI is on full screen or when it is maximized.
I have found on some answers of MATLAB Central that I Should select for WindowState "fullscreen" or "maximized" and that I should also select "Resize" and "AutoResizeChildren" in the Settings of POSITION. I have done all that, please see the attached Capture3, but I still have the same problem.
Does anyone have any solution for this problem ?
Many thanks to everyone in advance. app designer, gui layout, maximize, full screen, original layout MATLAB Answers — New Questions
1-D finite difference method
A UO2 fuel rod is surrounded by a Zr cladding and is cooled with water. After 1 hour of cooling, the final temperatures have been obtained as shown above. Using the 1-D finite difference method, calculate the temperature distribution in the fuel and cladding 1 hour earlier. Maybe someone would help or give an opinion.A UO2 fuel rod is surrounded by a Zr cladding and is cooled with water. After 1 hour of cooling, the final temperatures have been obtained as shown above. Using the 1-D finite difference method, calculate the temperature distribution in the fuel and cladding 1 hour earlier. Maybe someone would help or give an opinion. A UO2 fuel rod is surrounded by a Zr cladding and is cooled with water. After 1 hour of cooling, the final temperatures have been obtained as shown above. Using the 1-D finite difference method, calculate the temperature distribution in the fuel and cladding 1 hour earlier. Maybe someone would help or give an opinion. finite difference method, matlab, matrix, image processing, matlab function, temperature distribution MATLAB Answers — New Questions
I don’t get the charts
Hello everyone
I need help please
I don’t get any results and I don’t know why
Processing folder: 01
Number of .hea files found in subfolder 010: 100
Processing file: JS00001
Error loading record: JS00001
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00001. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00002
Error loading record: JS00002
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00002. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00004
Error loading record: JS00004
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00004. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00005
Error loading record: JS00005
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00005. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00006
Error loading record: JS00006
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00006. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00007
Error loading record: JS00007
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00007. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00008
Error loading record: JS00008
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00008. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00009
Error loading record: JS00009
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00009. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00010
Error loading record: JS00010
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00010. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00011
Error loading record: JS00011
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00011. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00012Hello everyone
I need help please
I don’t get any results and I don’t know why
Processing folder: 01
Number of .hea files found in subfolder 010: 100
Processing file: JS00001
Error loading record: JS00001
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00001. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00002
Error loading record: JS00002
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00002. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00004
Error loading record: JS00004
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00004. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00005
Error loading record: JS00005
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00005. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00006
Error loading record: JS00006
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00006. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00007
Error loading record: JS00007
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00007. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00008
Error loading record: JS00008
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00008. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00009
Error loading record: JS00009
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00009. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00010
Error loading record: JS00010
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00010. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00011
Error loading record: JS00011
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00011. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00012 Hello everyone
I need help please
I don’t get any results and I don’t know why
Processing folder: 01
Number of .hea files found in subfolder 010: 100
Processing file: JS00001
Error loading record: JS00001
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00001. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00002
Error loading record: JS00002
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00002. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00004
Error loading record: JS00004
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00004. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00005
Error loading record: JS00005
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00005. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00006
Error loading record: JS00006
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00006. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00007
Error loading record: JS00007
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00007. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00008
Error loading record: JS00008
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00008. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00009
Error loading record: JS00009
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00009. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00010
Error loading record: JS00010
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00010. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00011
Error loading record: JS00011
Could not find record: C:UsersRahafKaramDesktopa-large-scale-12-leada-largeWFDBRecords110JS00011. Search path is set to: ‘. C:UsersRahafKaramDesktopwfdb-app-toolbox-0-10-0mcode..database http://physionet.org/physiobank/database/’
Processing file: JS00012 ecg signal for record, wfdb toolbox MATLAB Answers — New Questions
how to prepare the data set for boxLabelDatastore function using image labler APP
I have a data set prepared by image labler APP. The format of the bounding box is different to the example showing on the matlab page.
Object Detection Using YOLO v2 Deep Learning – MATLAB & Simulink – MathWorks Australia
I wrote some codes to convert them, but not very successful. There are either single or double quotation marks in my table and
The boxLabelDatastore report an error message as below:
Error using boxLabelDatastore>iAssertValidBBoxFormat
The size of bounding box data must be M-by-4, M-by-5, or M-by-9, where M is the number of boxes in each table element. The column in the training data table that contains the bounding boxes must be a cell array.
My questions are:
1) How could I convert them into a cell array without ‘ or ”
2) Is there a easy way to label image and produce the dataset that mataches the example data set?
Regards
data_snail = load(‘340Ann.mat’);
imageFilename = data_snail.gTruth.DataSource;
% imageFilename = cell2table(imageFilename);
snaillist = data_snail.gTruth.LabelData.snail;
for i =1:length(snaillist)
tmp=snaillist{i};
rowStrings = arrayfun(@(row) strjoin(arrayfun(@(x) num2str(x), tmp(row, :), ‘UniformOutput’, false), ‘, ‘), 1:size(tmp, 1), ‘UniformOutput’, false);
if size(tmp,1)>1
resultString = strjoin(rowStrings, ‘; ‘);
else
resultString = rowStrings;
end
column(i,1) = string(imageFilename{i});
resultString = strcat(‘[‘, resultString, ‘]’);
column(i,2) = string(resultString);
resultString=[];
end
snailDataset = array2table(column, ‘VariableNames’, {‘imageFilename’, ‘snail’});
snailDataset.snail=cellstr(snailDataset.snail);I have a data set prepared by image labler APP. The format of the bounding box is different to the example showing on the matlab page.
Object Detection Using YOLO v2 Deep Learning – MATLAB & Simulink – MathWorks Australia
I wrote some codes to convert them, but not very successful. There are either single or double quotation marks in my table and
The boxLabelDatastore report an error message as below:
Error using boxLabelDatastore>iAssertValidBBoxFormat
The size of bounding box data must be M-by-4, M-by-5, or M-by-9, where M is the number of boxes in each table element. The column in the training data table that contains the bounding boxes must be a cell array.
My questions are:
1) How could I convert them into a cell array without ‘ or ”
2) Is there a easy way to label image and produce the dataset that mataches the example data set?
Regards
data_snail = load(‘340Ann.mat’);
imageFilename = data_snail.gTruth.DataSource;
% imageFilename = cell2table(imageFilename);
snaillist = data_snail.gTruth.LabelData.snail;
for i =1:length(snaillist)
tmp=snaillist{i};
rowStrings = arrayfun(@(row) strjoin(arrayfun(@(x) num2str(x), tmp(row, :), ‘UniformOutput’, false), ‘, ‘), 1:size(tmp, 1), ‘UniformOutput’, false);
if size(tmp,1)>1
resultString = strjoin(rowStrings, ‘; ‘);
else
resultString = rowStrings;
end
column(i,1) = string(imageFilename{i});
resultString = strcat(‘[‘, resultString, ‘]’);
column(i,2) = string(resultString);
resultString=[];
end
snailDataset = array2table(column, ‘VariableNames’, {‘imageFilename’, ‘snail’});
snailDataset.snail=cellstr(snailDataset.snail); I have a data set prepared by image labler APP. The format of the bounding box is different to the example showing on the matlab page.
Object Detection Using YOLO v2 Deep Learning – MATLAB & Simulink – MathWorks Australia
I wrote some codes to convert them, but not very successful. There are either single or double quotation marks in my table and
The boxLabelDatastore report an error message as below:
Error using boxLabelDatastore>iAssertValidBBoxFormat
The size of bounding box data must be M-by-4, M-by-5, or M-by-9, where M is the number of boxes in each table element. The column in the training data table that contains the bounding boxes must be a cell array.
My questions are:
1) How could I convert them into a cell array without ‘ or ”
2) Is there a easy way to label image and produce the dataset that mataches the example data set?
Regards
data_snail = load(‘340Ann.mat’);
imageFilename = data_snail.gTruth.DataSource;
% imageFilename = cell2table(imageFilename);
snaillist = data_snail.gTruth.LabelData.snail;
for i =1:length(snaillist)
tmp=snaillist{i};
rowStrings = arrayfun(@(row) strjoin(arrayfun(@(x) num2str(x), tmp(row, :), ‘UniformOutput’, false), ‘, ‘), 1:size(tmp, 1), ‘UniformOutput’, false);
if size(tmp,1)>1
resultString = strjoin(rowStrings, ‘; ‘);
else
resultString = rowStrings;
end
column(i,1) = string(imageFilename{i});
resultString = strcat(‘[‘, resultString, ‘]’);
column(i,2) = string(resultString);
resultString=[];
end
snailDataset = array2table(column, ‘VariableNames’, {‘imageFilename’, ‘snail’});
snailDataset.snail=cellstr(snailDataset.snail); deep learning, image labelling, boxlabeldatastore MATLAB Answers — New Questions
2 different legend on the same graph for the same data
I have a code which generates 2 plots with the same y-axes and x-axes values (see attached figures).
how can I plot only one figure but with the two different legends ?
attached below is my first plot code. the second code lines are similar but they create new plot and the new legend.
10x in advance,
Irad
for j=1:dpointsnum
plot(totxdata,totydata1(j,:),’linestyle’,getprop(lines,1),…
‘Color’,getprop(colors,j)); hold on;
end
grid(gca,’minor’);
xlabel(‘ncdotM’,’FontName’,’Arial’,’FontWeight’,’bold’,’FontSize’,12);
ylabel(‘Ductility ratio, mu’, FontSize=12,FontWeight=’bold’,FontName=’Arial’);
nLeg = legend(Leg); %adding legend entries to the plot
nLeg.Title.String = {‘Scaled distance’;'[m/kg^{1/3}]’}; %adding title to the lgenedI have a code which generates 2 plots with the same y-axes and x-axes values (see attached figures).
how can I plot only one figure but with the two different legends ?
attached below is my first plot code. the second code lines are similar but they create new plot and the new legend.
10x in advance,
Irad
for j=1:dpointsnum
plot(totxdata,totydata1(j,:),’linestyle’,getprop(lines,1),…
‘Color’,getprop(colors,j)); hold on;
end
grid(gca,’minor’);
xlabel(‘ncdotM’,’FontName’,’Arial’,’FontWeight’,’bold’,’FontSize’,12);
ylabel(‘Ductility ratio, mu’, FontSize=12,FontWeight=’bold’,FontName=’Arial’);
nLeg = legend(Leg); %adding legend entries to the plot
nLeg.Title.String = {‘Scaled distance’;'[m/kg^{1/3}]’}; %adding title to the lgened I have a code which generates 2 plots with the same y-axes and x-axes values (see attached figures).
how can I plot only one figure but with the two different legends ?
attached below is my first plot code. the second code lines are similar but they create new plot and the new legend.
10x in advance,
Irad
for j=1:dpointsnum
plot(totxdata,totydata1(j,:),’linestyle’,getprop(lines,1),…
‘Color’,getprop(colors,j)); hold on;
end
grid(gca,’minor’);
xlabel(‘ncdotM’,’FontName’,’Arial’,’FontWeight’,’bold’,’FontSize’,12);
ylabel(‘Ductility ratio, mu’, FontSize=12,FontWeight=’bold’,FontName=’Arial’);
nLeg = legend(Leg); %adding legend entries to the plot
nLeg.Title.String = {‘Scaled distance’;'[m/kg^{1/3}]’}; %adding title to the lgened plot, multipl legends MATLAB Answers — New Questions
DC CURRENT LIMITATION IN FOC OF PMSM
I am trying to simulate vector control of pmsm .The id iq PI takes care of the phase currents.I need to limit power also without using a PI because I already have speed PI and another PI used for FLUX weakeaning (voltage regulation based).So if have to implement it in hardware there would be 5 PI if i use a PI for DC current which is undesirable as my MCU is not that powerful.Is there any other logic to implement DC current limiting without using a PI in FOC of PMSMI am trying to simulate vector control of pmsm .The id iq PI takes care of the phase currents.I need to limit power also without using a PI because I already have speed PI and another PI used for FLUX weakeaning (voltage regulation based).So if have to implement it in hardware there would be 5 PI if i use a PI for DC current which is undesirable as my MCU is not that powerful.Is there any other logic to implement DC current limiting without using a PI in FOC of PMSM I am trying to simulate vector control of pmsm .The id iq PI takes care of the phase currents.I need to limit power also without using a PI because I already have speed PI and another PI used for FLUX weakeaning (voltage regulation based).So if have to implement it in hardware there would be 5 PI if i use a PI for DC current which is undesirable as my MCU is not that powerful.Is there any other logic to implement DC current limiting without using a PI in FOC of PMSM dc current, foc, pmsm, powerlimit MATLAB Answers — New Questions
How to use roialignLayer in the network?
https://ww2.mathworks.cn/matlabcentral/answers/1965924-use-roialign-layer-in-a-fastrcnn-network
Hello, I encountered a similar issue as in the link while using roialignLayer.The error displayed on my network is:
Input size mismatch.Size of input to this layer is different from the expected input size.Inputs to this layer:
from layer"activation_40_relu"(size 14(S)× 14(S)× 1024(C)× 1(B))
from layer "regionProposal" (size 1(S)×5(C)×1(B))
Can someone tell me how to modify the network or provide an example of successfully using roialignLayer?
Thank you very much, the network has provided.https://ww2.mathworks.cn/matlabcentral/answers/1965924-use-roialign-layer-in-a-fastrcnn-network
Hello, I encountered a similar issue as in the link while using roialignLayer.The error displayed on my network is:
Input size mismatch.Size of input to this layer is different from the expected input size.Inputs to this layer:
from layer"activation_40_relu"(size 14(S)× 14(S)× 1024(C)× 1(B))
from layer "regionProposal" (size 1(S)×5(C)×1(B))
Can someone tell me how to modify the network or provide an example of successfully using roialignLayer?
Thank you very much, the network has provided. https://ww2.mathworks.cn/matlabcentral/answers/1965924-use-roialign-layer-in-a-fastrcnn-network
Hello, I encountered a similar issue as in the link while using roialignLayer.The error displayed on my network is:
Input size mismatch.Size of input to this layer is different from the expected input size.Inputs to this layer:
from layer"activation_40_relu"(size 14(S)× 14(S)× 1024(C)× 1(B))
from layer "regionProposal" (size 1(S)×5(C)×1(B))
Can someone tell me how to modify the network or provide an example of successfully using roialignLayer?
Thank you very much, the network has provided. deep learning, computer vision MATLAB Answers — New Questions
Is the “kinematicTrajectory” function correct for calculating angular velocity?
Hello there,
I noticed that the “kinematicTrajectory” function calculates angular velocity from the body frame to the earth frame using the “rotatepoint” function. The “rotatepoint” function can be formulated with the Rzyx rotation matrix.
where is roll, is pitch, is yaw.
However, some papers [1] and references [2] use the transfer matrix T.
Does anyone know which is correct?
[1] Emran, Bara J., and Homayoun Najjaran. "A review of quadrotor: An underactuated mechanical system." Annual Reviews in Control 46 (2018): 165-180.
[2] KINEMATICS OF MOVING FRAMES. [Online]. Available: https://ocw.mit.edu/courses/2-017j-design-of-electromechanical-robotic-systems-fall-2009/0da9fb3965410fd50979bb179b56805a_MIT2_017JF09_ch09.pdf.Hello there,
I noticed that the “kinematicTrajectory” function calculates angular velocity from the body frame to the earth frame using the “rotatepoint” function. The “rotatepoint” function can be formulated with the Rzyx rotation matrix.
where is roll, is pitch, is yaw.
However, some papers [1] and references [2] use the transfer matrix T.
Does anyone know which is correct?
[1] Emran, Bara J., and Homayoun Najjaran. "A review of quadrotor: An underactuated mechanical system." Annual Reviews in Control 46 (2018): 165-180.
[2] KINEMATICS OF MOVING FRAMES. [Online]. Available: https://ocw.mit.edu/courses/2-017j-design-of-electromechanical-robotic-systems-fall-2009/0da9fb3965410fd50979bb179b56805a_MIT2_017JF09_ch09.pdf. Hello there,
I noticed that the “kinematicTrajectory” function calculates angular velocity from the body frame to the earth frame using the “rotatepoint” function. The “rotatepoint” function can be formulated with the Rzyx rotation matrix.
where is roll, is pitch, is yaw.
However, some papers [1] and references [2] use the transfer matrix T.
Does anyone know which is correct?
[1] Emran, Bara J., and Homayoun Najjaran. "A review of quadrotor: An underactuated mechanical system." Annual Reviews in Control 46 (2018): 165-180.
[2] KINEMATICS OF MOVING FRAMES. [Online]. Available: https://ocw.mit.edu/courses/2-017j-design-of-electromechanical-robotic-systems-fall-2009/0da9fb3965410fd50979bb179b56805a_MIT2_017JF09_ch09.pdf. kinematictrajectory, rotation matrix, issue MATLAB Answers — New Questions
how to fill color in 1/4 th circle
clear
syms x
figure
fun = sqrt(2*x-x.^2);
fplot(fun,[0,2.2]);
hold on
y1 = [0 1 0 0];
x1 = [0 1 1 0];
fill(x1,y1,’y’);
hold on
x2 = 1:0.01:2;
y2 = sqrt(2*x2-x2.^2);
fill([x2,fliplr(x2)],[y2,fliplr(y2)],’r’)clear
syms x
figure
fun = sqrt(2*x-x.^2);
fplot(fun,[0,2.2]);
hold on
y1 = [0 1 0 0];
x1 = [0 1 1 0];
fill(x1,y1,’y’);
hold on
x2 = 1:0.01:2;
y2 = sqrt(2*x2-x2.^2);
fill([x2,fliplr(x2)],[y2,fliplr(y2)],’r’) clear
syms x
figure
fun = sqrt(2*x-x.^2);
fplot(fun,[0,2.2]);
hold on
y1 = [0 1 0 0];
x1 = [0 1 1 0];
fill(x1,y1,’y’);
hold on
x2 = 1:0.01:2;
y2 = sqrt(2*x2-x2.^2);
fill([x2,fliplr(x2)],[y2,fliplr(y2)],’r’) xy MATLAB Answers — New Questions
警告: 在读取工作表 2016 时发生错误:未定义与 ‘Interface.00020846_0000_0000_C000_000000000046’ 类型的输入参数相对应的函数 ‘Select’。 警告: 在读取工作表 2017 时发生错误:未定义与 ‘Interface.00020846_0000_0000_C000_000000000046
clc
clear
% 让用户选择要读取的 Excel 文件
[filename, pathname] = uigetfile({‘*.xls;*.xlsx’,’Excel Files (*.xls, *.xlsx)’},’选择要读取的Excel文件’);
% 检查用户是否取消了选择
if isequal(filename,0)
disp(‘用户取消了文件选择’);
return;
end
% 构造完整的文件路径
fullfile = fullfile(pathname, filename);
% 获取 Excel 文件中的所有工作表信息
[~,sheets] = xlsfinfo(fullfile);
% 创建一个单元格数组来存储所有工作表的数据
all_data = cell(length(sheets), 1);
% 逐个读取每个工作表的数据
for i = 1:length(sheets)
try
data = xlsread(fullfile, sheets{i});
all_data{i} = data;
catch exception
warning([‘在读取工作表 ‘, sheets{i}, ‘ 时发生错误:’, exception.message]);
end
end
% 显示每个工作表的数据大小
for i = 1:length(sheets)
if ~isempty(all_data{i})
disp([‘工作表名:’, sheets{i}, ‘,数据大小:’, num2str(size(all_data{i}))]);
end
endclc
clear
% 让用户选择要读取的 Excel 文件
[filename, pathname] = uigetfile({‘*.xls;*.xlsx’,’Excel Files (*.xls, *.xlsx)’},’选择要读取的Excel文件’);
% 检查用户是否取消了选择
if isequal(filename,0)
disp(‘用户取消了文件选择’);
return;
end
% 构造完整的文件路径
fullfile = fullfile(pathname, filename);
% 获取 Excel 文件中的所有工作表信息
[~,sheets] = xlsfinfo(fullfile);
% 创建一个单元格数组来存储所有工作表的数据
all_data = cell(length(sheets), 1);
% 逐个读取每个工作表的数据
for i = 1:length(sheets)
try
data = xlsread(fullfile, sheets{i});
all_data{i} = data;
catch exception
warning([‘在读取工作表 ‘, sheets{i}, ‘ 时发生错误:’, exception.message]);
end
end
% 显示每个工作表的数据大小
for i = 1:length(sheets)
if ~isempty(all_data{i})
disp([‘工作表名:’, sheets{i}, ‘,数据大小:’, num2str(size(all_data{i}))]);
end
end clc
clear
% 让用户选择要读取的 Excel 文件
[filename, pathname] = uigetfile({‘*.xls;*.xlsx’,’Excel Files (*.xls, *.xlsx)’},’选择要读取的Excel文件’);
% 检查用户是否取消了选择
if isequal(filename,0)
disp(‘用户取消了文件选择’);
return;
end
% 构造完整的文件路径
fullfile = fullfile(pathname, filename);
% 获取 Excel 文件中的所有工作表信息
[~,sheets] = xlsfinfo(fullfile);
% 创建一个单元格数组来存储所有工作表的数据
all_data = cell(length(sheets), 1);
% 逐个读取每个工作表的数据
for i = 1:length(sheets)
try
data = xlsread(fullfile, sheets{i});
all_data{i} = data;
catch exception
warning([‘在读取工作表 ‘, sheets{i}, ‘ 时发生错误:’, exception.message]);
end
end
% 显示每个工作表的数据大小
for i = 1:length(sheets)
if ~isempty(all_data{i})
disp([‘工作表名:’, sheets{i}, ‘,数据大小:’, num2str(size(all_data{i}))]);
end
end 表格中的数据就是缺失的 MATLAB Answers — New Questions
How to add math symbols to Live Script text?
Some five years ago, I used Matlab as a handy "math typewriter": it was easy to insert symbols to text without remembering their LaTeX keywords. I just opened a dropdown list and picked what I needed.
Now, I have installed Matlab R2023b to my new laptop, and I can not find that functionality any more.
Is it still there, and I’m just not able to find it?
Or, has it been removed, and I’b better just learn my LaTeX?
Or, should I install some extra library to get is working again?
Or, could I return to the old Matlab version (maybe Matlab 2018 or something like this)?Some five years ago, I used Matlab as a handy "math typewriter": it was easy to insert symbols to text without remembering their LaTeX keywords. I just opened a dropdown list and picked what I needed.
Now, I have installed Matlab R2023b to my new laptop, and I can not find that functionality any more.
Is it still there, and I’m just not able to find it?
Or, has it been removed, and I’b better just learn my LaTeX?
Or, should I install some extra library to get is working again?
Or, could I return to the old Matlab version (maybe Matlab 2018 or something like this)? Some five years ago, I used Matlab as a handy "math typewriter": it was easy to insert symbols to text without remembering their LaTeX keywords. I just opened a dropdown list and picked what I needed.
Now, I have installed Matlab R2023b to my new laptop, and I can not find that functionality any more.
Is it still there, and I’m just not able to find it?
Or, has it been removed, and I’b better just learn my LaTeX?
Or, should I install some extra library to get is working again?
Or, could I return to the old Matlab version (maybe Matlab 2018 or something like this)? live script, mathematical symbols, text MATLAB Answers — New Questions
How do I programmatically set the parameters of a Get Transform block?
I want to programmatically set the rigid body tree parameter of a get transform block and I tried doing that using the set_param function. If i write the value of the parameter as a string:
set_param(strcat(modelName, ‘/Get Transform’), ‘RigidBodyTree’, ‘DOF3_Arm’) %DOF3_Arm = importrobot(‘RobotStructure’);
the associated field in the Block’s Parameter will just have a string but no rigid body tree, and if I use a variable instead of the string i get the following error:
Error using Script_function_back2WF
Invalid setting in Get Transform block (mask) ‘Get Transform’ for parameter
‘RigidBodyTree’
What is the correct way of setting this parameter? Thank you in advance!I want to programmatically set the rigid body tree parameter of a get transform block and I tried doing that using the set_param function. If i write the value of the parameter as a string:
set_param(strcat(modelName, ‘/Get Transform’), ‘RigidBodyTree’, ‘DOF3_Arm’) %DOF3_Arm = importrobot(‘RobotStructure’);
the associated field in the Block’s Parameter will just have a string but no rigid body tree, and if I use a variable instead of the string i get the following error:
Error using Script_function_back2WF
Invalid setting in Get Transform block (mask) ‘Get Transform’ for parameter
‘RigidBodyTree’
What is the correct way of setting this parameter? Thank you in advance! I want to programmatically set the rigid body tree parameter of a get transform block and I tried doing that using the set_param function. If i write the value of the parameter as a string:
set_param(strcat(modelName, ‘/Get Transform’), ‘RigidBodyTree’, ‘DOF3_Arm’) %DOF3_Arm = importrobot(‘RobotStructure’);
the associated field in the Block’s Parameter will just have a string but no rigid body tree, and if I use a variable instead of the string i get the following error:
Error using Script_function_back2WF
Invalid setting in Get Transform block (mask) ‘Get Transform’ for parameter
‘RigidBodyTree’
What is the correct way of setting this parameter? Thank you in advance! matlab, simulink, matlab code, functions MATLAB Answers — New Questions
How to Create Slicing Number of 2D plots in matlab
How to Create Slicing Number of 2D plots in matlab Similar plot which i was uploadedHow to Create Slicing Number of 2D plots in matlab Similar plot which i was uploaded How to Create Slicing Number of 2D plots in matlab Similar plot which i was uploaded for research graphs plotting MATLAB Answers — New Questions
Multiple PID tuning in order to control all four states in the inverted pendulum model
Hi!
I have to control the four states of the classical nonlinear inverted pendulum on a cart model (position and velocity of the cart, angle and angular velocity of the pendulum) in Simulink through PID control. Being on a cart it doesn’t have to go through the swing up, the initial condition for the angle is -0.5 (desired angle with a small perturbation), so it’s just the balancing problem.
This is my Simulink control scheme:
My implementation works as it should, but I had to manually tune the four PIDs because I wasn’t able to obtain the same system with just one controller (if I give a vector of the four errors as input to a single PID block designed with a vector of four gains it messes up and creates a 4-dimensional output instead of executing the row-column product) and I tried everything but couldn’t tune the multiple PIDs at the same time. Of course, the tuner app embedded in every PID block is useless in my case since the output of the system isn’t just depending on a single PID’s control input. I wonder if I can automatically find the optimal choices for the PID controllers, can someone help me?Hi!
I have to control the four states of the classical nonlinear inverted pendulum on a cart model (position and velocity of the cart, angle and angular velocity of the pendulum) in Simulink through PID control. Being on a cart it doesn’t have to go through the swing up, the initial condition for the angle is -0.5 (desired angle with a small perturbation), so it’s just the balancing problem.
This is my Simulink control scheme:
My implementation works as it should, but I had to manually tune the four PIDs because I wasn’t able to obtain the same system with just one controller (if I give a vector of the four errors as input to a single PID block designed with a vector of four gains it messes up and creates a 4-dimensional output instead of executing the row-column product) and I tried everything but couldn’t tune the multiple PIDs at the same time. Of course, the tuner app embedded in every PID block is useless in my case since the output of the system isn’t just depending on a single PID’s control input. I wonder if I can automatically find the optimal choices for the PID controllers, can someone help me? Hi!
I have to control the four states of the classical nonlinear inverted pendulum on a cart model (position and velocity of the cart, angle and angular velocity of the pendulum) in Simulink through PID control. Being on a cart it doesn’t have to go through the swing up, the initial condition for the angle is -0.5 (desired angle with a small perturbation), so it’s just the balancing problem.
This is my Simulink control scheme:
My implementation works as it should, but I had to manually tune the four PIDs because I wasn’t able to obtain the same system with just one controller (if I give a vector of the four errors as input to a single PID block designed with a vector of four gains it messes up and creates a 4-dimensional output instead of executing the row-column product) and I tried everything but couldn’t tune the multiple PIDs at the same time. Of course, the tuner app embedded in every PID block is useless in my case since the output of the system isn’t just depending on a single PID’s control input. I wonder if I can automatically find the optimal choices for the PID controllers, can someone help me? pid, tuning, simulink MATLAB Answers — New Questions
Fusing layers of a color image
Hi,
After segmenting the 3 layers of a Truecolor image , I tried to fuse the segmented images but an error appear , every layer is an rgb image after overlaying a color for the region to segmented using ind2rgb
<</matlabcentral/answers/uploaded_files/48640/voi1.PNG>>
<</matlabcentral/answers/uploaded_files/48641/voi2.PNG>>
<</matlabcentral/answers/uploaded_files/48642/voi3.PNG>>
here is the code
image(I_rgb1)
im1=imoverlay(FC1,FC1~=2)
title(sprintf(‘Fuzzy connected component 1’));
figure(2)
image(I_rgb2)
im2=imoverlay(FC2,FC2~=2)
title(sprintf(‘Fuzzy connected component 2’));
figure(3)
image(I_rgb3)
im3=imoverlay(FC3,FC3~=2);
title(sprintf(‘Fuzzy connected component 3’));
FC= cat(3,im1,im2,im3);
when i want to display the image, image() doesn’t work also imshow()
figure ;
imshow(FC,[])
% the error: images.internal.imageDisplayParseInputs({‘Parent’,’Border’,’Reduce’},preparsed_varargin{:});
image(FC)
% the error :Invalid datatype for Image CData. Numeric or logical matrix required for image CData.Hi,
After segmenting the 3 layers of a Truecolor image , I tried to fuse the segmented images but an error appear , every layer is an rgb image after overlaying a color for the region to segmented using ind2rgb
<</matlabcentral/answers/uploaded_files/48640/voi1.PNG>>
<</matlabcentral/answers/uploaded_files/48641/voi2.PNG>>
<</matlabcentral/answers/uploaded_files/48642/voi3.PNG>>
here is the code
image(I_rgb1)
im1=imoverlay(FC1,FC1~=2)
title(sprintf(‘Fuzzy connected component 1’));
figure(2)
image(I_rgb2)
im2=imoverlay(FC2,FC2~=2)
title(sprintf(‘Fuzzy connected component 2’));
figure(3)
image(I_rgb3)
im3=imoverlay(FC3,FC3~=2);
title(sprintf(‘Fuzzy connected component 3’));
FC= cat(3,im1,im2,im3);
when i want to display the image, image() doesn’t work also imshow()
figure ;
imshow(FC,[])
% the error: images.internal.imageDisplayParseInputs({‘Parent’,’Border’,’Reduce’},preparsed_varargin{:});
image(FC)
% the error :Invalid datatype for Image CData. Numeric or logical matrix required for image CData. Hi,
After segmenting the 3 layers of a Truecolor image , I tried to fuse the segmented images but an error appear , every layer is an rgb image after overlaying a color for the region to segmented using ind2rgb
<</matlabcentral/answers/uploaded_files/48640/voi1.PNG>>
<</matlabcentral/answers/uploaded_files/48641/voi2.PNG>>
<</matlabcentral/answers/uploaded_files/48642/voi3.PNG>>
here is the code
image(I_rgb1)
im1=imoverlay(FC1,FC1~=2)
title(sprintf(‘Fuzzy connected component 1’));
figure(2)
image(I_rgb2)
im2=imoverlay(FC2,FC2~=2)
title(sprintf(‘Fuzzy connected component 2’));
figure(3)
image(I_rgb3)
im3=imoverlay(FC3,FC3~=2);
title(sprintf(‘Fuzzy connected component 3’));
FC= cat(3,im1,im2,im3);
when i want to display the image, image() doesn’t work also imshow()
figure ;
imshow(FC,[])
% the error: images.internal.imageDisplayParseInputs({‘Parent’,’Border’,’Reduce’},preparsed_varargin{:});
image(FC)
% the error :Invalid datatype for Image CData. Numeric or logical matrix required for image CData. display color image, truecolorimage, indexedimage, overlaying, superpose MATLAB Answers — New Questions
How to detect right triangles from an image and find the three side lengths of each triangle?
Post Content Post Content digital image processing, hough MATLAB Answers — New Questions