Category: Matlab
Category Archives: Matlab
Why I am I not able to edit appdesigner in Ubuntu?
When I was following the initial tutorial of app designer, I happened to edit the slider word to amplitude but I couldn’t do it. Later I found that I cannot edit anything except drag and drop of components in canvas. Please help me as I need to finish designing a UI soon.
Thanks, Vinayak BhatteWhen I was following the initial tutorial of app designer, I happened to edit the slider word to amplitude but I couldn’t do it. Later I found that I cannot edit anything except drag and drop of components in canvas. Please help me as I need to finish designing a UI soon.
Thanks, Vinayak Bhatte When I was following the initial tutorial of app designer, I happened to edit the slider word to amplitude but I couldn’t do it. Later I found that I cannot edit anything except drag and drop of components in canvas. Please help me as I need to finish designing a UI soon.
Thanks, Vinayak Bhatte edit, appdesigner, ubuntu, linux MATLAB Answers — New Questions
To create (Heat Recovery Steam Generator) HRSG Simulink Model
Hi, so I desired to create HRSG model for simulation purposes (one of the objectives for Final Year Project (FYP), unfortunately since I have a novice background in the mechanical field ( I’m in electrical engineering field), I have no idea where /how to start. Could anyone give me some pointers what info should I look for/ or suggest any open sources / materials of HRSG simulink models to kickstart my project?Hi, so I desired to create HRSG model for simulation purposes (one of the objectives for Final Year Project (FYP), unfortunately since I have a novice background in the mechanical field ( I’m in electrical engineering field), I have no idea where /how to start. Could anyone give me some pointers what info should I look for/ or suggest any open sources / materials of HRSG simulink models to kickstart my project? Hi, so I desired to create HRSG model for simulation purposes (one of the objectives for Final Year Project (FYP), unfortunately since I have a novice background in the mechanical field ( I’m in electrical engineering field), I have no idea where /how to start. Could anyone give me some pointers what info should I look for/ or suggest any open sources / materials of HRSG simulink models to kickstart my project? hrsg, whrb, ccgt, energy recovery heat exchanger, heat exchanger, simulink, mechanical MATLAB Answers — New Questions
Crash Matlab: Simulation initialization very slow – Re-evaluating bus selectors step lasts forever
Following a crash of Matlab, my simulink model is now taking ages to start : the simulation step "Re-evaluating bus selectors: Started" lasts more than 10 minutes while it was super fast previsouly. Is anyone knowing what Simulink is doing during this step? Any idea for a potential fix? (clearing some projects files which may be corrupted?)
ThxFollowing a crash of Matlab, my simulink model is now taking ages to start : the simulation step "Re-evaluating bus selectors: Started" lasts more than 10 minutes while it was super fast previsouly. Is anyone knowing what Simulink is doing during this step? Any idea for a potential fix? (clearing some projects files which may be corrupted?)
Thx Following a crash of Matlab, my simulink model is now taking ages to start : the simulation step "Re-evaluating bus selectors: Started" lasts more than 10 minutes while it was super fast previsouly. Is anyone knowing what Simulink is doing during this step? Any idea for a potential fix? (clearing some projects files which may be corrupted?)
Thx crash, slow simulink simulation init MATLAB Answers — New Questions
How to read road network data off a map in MATLAB?
Hello everyone,
I am working on Electric vehicle charging station location and plannimng problem. The idea is, that given any city map, we should be able to plan and size the Electric vehicle charging stations locations on a map. For the same, I want to be able to input the city map via google, OpenStreet etc, and my code should be able to read the road network details, like nodes, distance, width, unidirectional or bidirectional road etc.
To be honest, I have made zero progress in that. Using geoplot function, I can read the location, and I can also see the road layout, but Im not able to get anything more out of it.
I already read the document on roadprops,but it isnt useful. I figured its something to do with image processing.
Any help or an example or links would be appreciatedHello everyone,
I am working on Electric vehicle charging station location and plannimng problem. The idea is, that given any city map, we should be able to plan and size the Electric vehicle charging stations locations on a map. For the same, I want to be able to input the city map via google, OpenStreet etc, and my code should be able to read the road network details, like nodes, distance, width, unidirectional or bidirectional road etc.
To be honest, I have made zero progress in that. Using geoplot function, I can read the location, and I can also see the road layout, but Im not able to get anything more out of it.
I already read the document on roadprops,but it isnt useful. I figured its something to do with image processing.
Any help or an example or links would be appreciated Hello everyone,
I am working on Electric vehicle charging station location and plannimng problem. The idea is, that given any city map, we should be able to plan and size the Electric vehicle charging stations locations on a map. For the same, I want to be able to input the city map via google, OpenStreet etc, and my code should be able to read the road network details, like nodes, distance, width, unidirectional or bidirectional road etc.
To be honest, I have made zero progress in that. Using geoplot function, I can read the location, and I can also see the road layout, but Im not able to get anything more out of it.
I already read the document on roadprops,but it isnt useful. I figured its something to do with image processing.
Any help or an example or links would be appreciated image processing, maps, road MATLAB Answers — New Questions
Count unique vector in a sequence
Hello,
I have a sequence of 16 column vectors v_n with dimension 4×1: [ v_1 v_2 … v_16 ]
How can I count the number of different vectors in this sequence?
ThanksHello,
I have a sequence of 16 column vectors v_n with dimension 4×1: [ v_1 v_2 … v_16 ]
How can I count the number of different vectors in this sequence?
Thanks Hello,
I have a sequence of 16 column vectors v_n with dimension 4×1: [ v_1 v_2 … v_16 ]
How can I count the number of different vectors in this sequence?
Thanks unique MATLAB Answers — New Questions
No effect is observed when I try to use StartVector in eigs to improve numerical efficiency
I test the efficiency of using a good StartVector in eigs.
The code is quite simple.
First, I use eigs to figure out the eigenvector v1,
then I use this eigenvector v1 as the StartVector to run eigs again.
I expect that much less time might be needed now.
Nevertheless,
the time cost shows no improvement at all.
My code is as follows
———————————————————————-
format long
n = 3000;
A = rand(n,n);
A = A + A’;
tic
[v1,eta1]=eigs(@(vec)test_eigs(vec,A),n,1,’lm’,’Display’,0,’IsFunctionSymmetric’,0,’MaxIterations’,300);
toc
StartVector = v1;
tic
[v2,eta2]=eigs(@(vec)test_eigs(vec,A),n,1,’lm’,’Display’,0,’IsFunctionSymmetric’,0,’MaxIterations’,300,’StartVector’,StartVector);
toc
eta1
eta2
function vec1 = test_eigs(vec0,A)
vec1 = A * vec0;
end
————————————————————————————
The output is as follows
~~~~~~~~~~~~~~~~~~~~~~
Elapsed time is 0.069811 seconds.
Elapsed time is 0.066047 seconds.
eta1 =
3.000980119229400e+03
eta2 =
3.000980119229400e+03
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So my question is,
is there anything wrong in my understanding about StartVector in eigs?
Any suggestion or comment would be greatly appreciated.I test the efficiency of using a good StartVector in eigs.
The code is quite simple.
First, I use eigs to figure out the eigenvector v1,
then I use this eigenvector v1 as the StartVector to run eigs again.
I expect that much less time might be needed now.
Nevertheless,
the time cost shows no improvement at all.
My code is as follows
———————————————————————-
format long
n = 3000;
A = rand(n,n);
A = A + A’;
tic
[v1,eta1]=eigs(@(vec)test_eigs(vec,A),n,1,’lm’,’Display’,0,’IsFunctionSymmetric’,0,’MaxIterations’,300);
toc
StartVector = v1;
tic
[v2,eta2]=eigs(@(vec)test_eigs(vec,A),n,1,’lm’,’Display’,0,’IsFunctionSymmetric’,0,’MaxIterations’,300,’StartVector’,StartVector);
toc
eta1
eta2
function vec1 = test_eigs(vec0,A)
vec1 = A * vec0;
end
————————————————————————————
The output is as follows
~~~~~~~~~~~~~~~~~~~~~~
Elapsed time is 0.069811 seconds.
Elapsed time is 0.066047 seconds.
eta1 =
3.000980119229400e+03
eta2 =
3.000980119229400e+03
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So my question is,
is there anything wrong in my understanding about StartVector in eigs?
Any suggestion or comment would be greatly appreciated. I test the efficiency of using a good StartVector in eigs.
The code is quite simple.
First, I use eigs to figure out the eigenvector v1,
then I use this eigenvector v1 as the StartVector to run eigs again.
I expect that much less time might be needed now.
Nevertheless,
the time cost shows no improvement at all.
My code is as follows
———————————————————————-
format long
n = 3000;
A = rand(n,n);
A = A + A’;
tic
[v1,eta1]=eigs(@(vec)test_eigs(vec,A),n,1,’lm’,’Display’,0,’IsFunctionSymmetric’,0,’MaxIterations’,300);
toc
StartVector = v1;
tic
[v2,eta2]=eigs(@(vec)test_eigs(vec,A),n,1,’lm’,’Display’,0,’IsFunctionSymmetric’,0,’MaxIterations’,300,’StartVector’,StartVector);
toc
eta1
eta2
function vec1 = test_eigs(vec0,A)
vec1 = A * vec0;
end
————————————————————————————
The output is as follows
~~~~~~~~~~~~~~~~~~~~~~
Elapsed time is 0.069811 seconds.
Elapsed time is 0.066047 seconds.
eta1 =
3.000980119229400e+03
eta2 =
3.000980119229400e+03
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So my question is,
is there anything wrong in my understanding about StartVector in eigs?
Any suggestion or comment would be greatly appreciated. eigs MATLAB Answers — New Questions
Random numbers from array
Suppose I have the following array A=[2,1,5,6,20,55,6,9,100,1000,325,2301] which contains distinct numbers
I want to select for example four elements from the array randomly and then delete them from the original array. For example if the selected numbers were 20,2,9,325 so the new array R=[20,2,9,325] and A=the remaining elements.Suppose I have the following array A=[2,1,5,6,20,55,6,9,100,1000,325,2301] which contains distinct numbers
I want to select for example four elements from the array randomly and then delete them from the original array. For example if the selected numbers were 20,2,9,325 so the new array R=[20,2,9,325] and A=the remaining elements. Suppose I have the following array A=[2,1,5,6,20,55,6,9,100,1000,325,2301] which contains distinct numbers
I want to select for example four elements from the array randomly and then delete them from the original array. For example if the selected numbers were 20,2,9,325 so the new array R=[20,2,9,325] and A=the remaining elements. random num, random numbers; array operations MATLAB Answers — New Questions
What About My Matrix Makes eig Inaccurate?
Hi all,
I want to understand what about my matrix is causing eig to return inaccurate eigensystem calculations. The code to reproduce the matrix (called ‘cov_matrix_P’) is attached below. I am wondering if it has to with the fact that there are several orders of magnitude between the largest and smallest elements in cov_matrix_P. Most importantly, I would like to know what about my matrix is causing these inaccuracies, and if possible, how I could improve the result.
N = 30;
f_matrix = zeros(N, N);
even_sum_matrix = zeros(N, N);
odd_sum_matrix = zeros(N, N);
for t = 1:N
for s = 1:N
even_sum = 0;
odd_sum = 0;
% Calculate even_sum
for r = 0:2:min(t, s)
if N-r < s-r || N-s < t-r
even_sum = 0;
continue
end
even_sum = even_sum + nchoosek(N, r) * nchoosek(N-r, s-r) * nchoosek(N-s, t-r) / (nchoosek(N, s) * nchoosek(N, t));
end
% Calculate odd_sum
for r = 1:2:min(t, s)
if N-r < s-r || N-s < t-r
odd_sum = 0;
continue
end
odd_sum = odd_sum + nchoosek(N, r) * nchoosek(N-r, s-r) * nchoosek(N-s, t-r) / (nchoosek(N, s) * nchoosek(N, t));
end
f_matrix(t, s) = even_sum – odd_sum;
even_sum_matrix(t, s) = even_sum;
odd_sum_matrix(t, s) = odd_sum;
end
end
[f_eigvector,f_eigvalues] = eig(f_matrix);
diag_elements = diag(f_eigvalues);
inverted_elements = 1./diag_elements;
f_inverse = f_eigvector * diag(inverted_elements) * f_eigvector’;
variances = [0.9236396396396394, 0.9925285285285287, 0.9966406406406404, 0.9997037037037036, 1.0001001001001, 1.0008568568568565, 1.0008568568568565, 0.9999759759759757, 1.0006766766766766, 0.9999759759759757, 1.0008568568568565, 0.9998438438438437, 1.0008568568568565, 0.992892892892893, 0.9995555555555556, 1.000676676676677, 1.001001001001001, 1.0001001001001, 0.9982942942942948, 1.0005165165165162, 0.9997037037037036, 0.9982942942942948, 0.9992352352352354, 1.0006766766766766, 0.9995555555555556, 1.000424424424425, 0.9978618618618617, 0.9984984984984983, 0.9980820820820822, 1.0001001001001];
cov_matrix_G = diag(variances);
cov_matrix_P = f_inverse * cov_matrix_G * f_inverse’;
[V,D] = eig(cov_matrix_P);
eig_check = cov_matrix_P * V – V * D;
max_error = abs(eig_check);
max_error = max(max_error(:));Hi all,
I want to understand what about my matrix is causing eig to return inaccurate eigensystem calculations. The code to reproduce the matrix (called ‘cov_matrix_P’) is attached below. I am wondering if it has to with the fact that there are several orders of magnitude between the largest and smallest elements in cov_matrix_P. Most importantly, I would like to know what about my matrix is causing these inaccuracies, and if possible, how I could improve the result.
N = 30;
f_matrix = zeros(N, N);
even_sum_matrix = zeros(N, N);
odd_sum_matrix = zeros(N, N);
for t = 1:N
for s = 1:N
even_sum = 0;
odd_sum = 0;
% Calculate even_sum
for r = 0:2:min(t, s)
if N-r < s-r || N-s < t-r
even_sum = 0;
continue
end
even_sum = even_sum + nchoosek(N, r) * nchoosek(N-r, s-r) * nchoosek(N-s, t-r) / (nchoosek(N, s) * nchoosek(N, t));
end
% Calculate odd_sum
for r = 1:2:min(t, s)
if N-r < s-r || N-s < t-r
odd_sum = 0;
continue
end
odd_sum = odd_sum + nchoosek(N, r) * nchoosek(N-r, s-r) * nchoosek(N-s, t-r) / (nchoosek(N, s) * nchoosek(N, t));
end
f_matrix(t, s) = even_sum – odd_sum;
even_sum_matrix(t, s) = even_sum;
odd_sum_matrix(t, s) = odd_sum;
end
end
[f_eigvector,f_eigvalues] = eig(f_matrix);
diag_elements = diag(f_eigvalues);
inverted_elements = 1./diag_elements;
f_inverse = f_eigvector * diag(inverted_elements) * f_eigvector’;
variances = [0.9236396396396394, 0.9925285285285287, 0.9966406406406404, 0.9997037037037036, 1.0001001001001, 1.0008568568568565, 1.0008568568568565, 0.9999759759759757, 1.0006766766766766, 0.9999759759759757, 1.0008568568568565, 0.9998438438438437, 1.0008568568568565, 0.992892892892893, 0.9995555555555556, 1.000676676676677, 1.001001001001001, 1.0001001001001, 0.9982942942942948, 1.0005165165165162, 0.9997037037037036, 0.9982942942942948, 0.9992352352352354, 1.0006766766766766, 0.9995555555555556, 1.000424424424425, 0.9978618618618617, 0.9984984984984983, 0.9980820820820822, 1.0001001001001];
cov_matrix_G = diag(variances);
cov_matrix_P = f_inverse * cov_matrix_G * f_inverse’;
[V,D] = eig(cov_matrix_P);
eig_check = cov_matrix_P * V – V * D;
max_error = abs(eig_check);
max_error = max(max_error(:)); Hi all,
I want to understand what about my matrix is causing eig to return inaccurate eigensystem calculations. The code to reproduce the matrix (called ‘cov_matrix_P’) is attached below. I am wondering if it has to with the fact that there are several orders of magnitude between the largest and smallest elements in cov_matrix_P. Most importantly, I would like to know what about my matrix is causing these inaccuracies, and if possible, how I could improve the result.
N = 30;
f_matrix = zeros(N, N);
even_sum_matrix = zeros(N, N);
odd_sum_matrix = zeros(N, N);
for t = 1:N
for s = 1:N
even_sum = 0;
odd_sum = 0;
% Calculate even_sum
for r = 0:2:min(t, s)
if N-r < s-r || N-s < t-r
even_sum = 0;
continue
end
even_sum = even_sum + nchoosek(N, r) * nchoosek(N-r, s-r) * nchoosek(N-s, t-r) / (nchoosek(N, s) * nchoosek(N, t));
end
% Calculate odd_sum
for r = 1:2:min(t, s)
if N-r < s-r || N-s < t-r
odd_sum = 0;
continue
end
odd_sum = odd_sum + nchoosek(N, r) * nchoosek(N-r, s-r) * nchoosek(N-s, t-r) / (nchoosek(N, s) * nchoosek(N, t));
end
f_matrix(t, s) = even_sum – odd_sum;
even_sum_matrix(t, s) = even_sum;
odd_sum_matrix(t, s) = odd_sum;
end
end
[f_eigvector,f_eigvalues] = eig(f_matrix);
diag_elements = diag(f_eigvalues);
inverted_elements = 1./diag_elements;
f_inverse = f_eigvector * diag(inverted_elements) * f_eigvector’;
variances = [0.9236396396396394, 0.9925285285285287, 0.9966406406406404, 0.9997037037037036, 1.0001001001001, 1.0008568568568565, 1.0008568568568565, 0.9999759759759757, 1.0006766766766766, 0.9999759759759757, 1.0008568568568565, 0.9998438438438437, 1.0008568568568565, 0.992892892892893, 0.9995555555555556, 1.000676676676677, 1.001001001001001, 1.0001001001001, 0.9982942942942948, 1.0005165165165162, 0.9997037037037036, 0.9982942942942948, 0.9992352352352354, 1.0006766766766766, 0.9995555555555556, 1.000424424424425, 0.9978618618618617, 0.9984984984984983, 0.9980820820820822, 1.0001001001001];
cov_matrix_G = diag(variances);
cov_matrix_P = f_inverse * cov_matrix_G * f_inverse’;
[V,D] = eig(cov_matrix_P);
eig_check = cov_matrix_P * V – V * D;
max_error = abs(eig_check);
max_error = max(max_error(:)); eigenvalue, eigenvector, precision MATLAB Answers — New Questions
Why do I receive numerous nonexistent warnings after upgrade installation?
Post Content Post Content warning nonexistent MATLAB Answers — New Questions
Tridiagonal Matrix with subdiagonal and main diagonal is also matrix
I have two matrices A and B. I want A to be main diagonal and B to be my subdiagonals. How do I create such a matrix? By the way sizes of A and B changes but they are square matrices.
Specifically, a1=4,b1=-1
A =diag(a1*ones(1,N-1)) + diag(b1*ones(1,N-2),1) + diag(b1*ones(1,N-2),-1)
B=(-1)*eye(N-1)
These are my A and B matrices. I need to define a (N-1)*(N-1) times (N-1)*(N-1) matrix . For example for N=1000 or N=5000 I should be able to change the N value.I have two matrices A and B. I want A to be main diagonal and B to be my subdiagonals. How do I create such a matrix? By the way sizes of A and B changes but they are square matrices.
Specifically, a1=4,b1=-1
A =diag(a1*ones(1,N-1)) + diag(b1*ones(1,N-2),1) + diag(b1*ones(1,N-2),-1)
B=(-1)*eye(N-1)
These are my A and B matrices. I need to define a (N-1)*(N-1) times (N-1)*(N-1) matrix . For example for N=1000 or N=5000 I should be able to change the N value. I have two matrices A and B. I want A to be main diagonal and B to be my subdiagonals. How do I create such a matrix? By the way sizes of A and B changes but they are square matrices.
Specifically, a1=4,b1=-1
A =diag(a1*ones(1,N-1)) + diag(b1*ones(1,N-2),1) + diag(b1*ones(1,N-2),-1)
B=(-1)*eye(N-1)
These are my A and B matrices. I need to define a (N-1)*(N-1) times (N-1)*(N-1) matrix . For example for N=1000 or N=5000 I should be able to change the N value. tridiagonal MATLAB Answers — New Questions
Problem in building up the Matlab-Carla Interface
Hi everyone,
I tried to build up the two-directional Simulink-Carla Interface and so started on setting up the Carla-to-Matlab interface to have a look on it.
So i started with this project: https://github.com/darkscyla/MATLAB-Carla-Interface#proof-of-concept.
I followed the tutorial video in it to connect Carla with Matlab, but i can’t get this step done so far(in video 1:58):
On my laptop it always shows:
Or
I have tried the solution here: http://coding-guru.com/easy_install-on-windows/, it doesn’t work:
setuptools is installed as shown;
Path setting for python is good:
Does anyone know another way to install the .egg file?
Or if someone also works on the Simulink-Carla interface and has some tipps, please feel free to share.
Thanks a lot.Hi everyone,
I tried to build up the two-directional Simulink-Carla Interface and so started on setting up the Carla-to-Matlab interface to have a look on it.
So i started with this project: https://github.com/darkscyla/MATLAB-Carla-Interface#proof-of-concept.
I followed the tutorial video in it to connect Carla with Matlab, but i can’t get this step done so far(in video 1:58):
On my laptop it always shows:
Or
I have tried the solution here: http://coding-guru.com/easy_install-on-windows/, it doesn’t work:
setuptools is installed as shown;
Path setting for python is good:
Does anyone know another way to install the .egg file?
Or if someone also works on the Simulink-Carla interface and has some tipps, please feel free to share.
Thanks a lot. Hi everyone,
I tried to build up the two-directional Simulink-Carla Interface and so started on setting up the Carla-to-Matlab interface to have a look on it.
So i started with this project: https://github.com/darkscyla/MATLAB-Carla-Interface#proof-of-concept.
I followed the tutorial video in it to connect Carla with Matlab, but i can’t get this step done so far(in video 1:58):
On my laptop it always shows:
Or
I have tried the solution here: http://coding-guru.com/easy_install-on-windows/, it doesn’t work:
setuptools is installed as shown;
Path setting for python is good:
Does anyone know another way to install the .egg file?
Or if someone also works on the Simulink-Carla interface and has some tipps, please feel free to share.
Thanks a lot. carla, interface, setuptools, python, simulink, control evaluation, mpc MATLAB Answers — New Questions
Eigenvalue for a big matrix
matrx problemmatrx problem matrx problem numerical linear algebra, sparse eigendecomposition, block toeplitz MATLAB Answers — New Questions
How I customize self attention layer for identifying wafer defects?
how I used customize multi head self attention in the CNN network for detecting wafer defects ? please explain with examplehow I used customize multi head self attention in the CNN network for detecting wafer defects ? please explain with example how I used customize multi head self attention in the CNN network for detecting wafer defects ? please explain with example multi head self attention MATLAB Answers — New Questions
Request about comment char % vs C++ //
I’m switching back and forth between C(++) for my Arduino Pico and MatLab App Designer
It would be really nice if when I type // to start a comment you could switch it to %
You have so much help in completion of typed stuff this shouldn’t be hard for next release.
I’m getting the hang of MatLab but it can still be irritationg for "real" programmers. :-)I’m switching back and forth between C(++) for my Arduino Pico and MatLab App Designer
It would be really nice if when I type // to start a comment you could switch it to %
You have so much help in completion of typed stuff this shouldn’t be hard for next release.
I’m getting the hang of MatLab but it can still be irritationg for "real" programmers. 🙂 I’m switching back and forth between C(++) for my Arduino Pico and MatLab App Designer
It would be really nice if when I type // to start a comment you could switch it to %
You have so much help in completion of typed stuff this shouldn’t be hard for next release.
I’m getting the hang of MatLab but it can still be irritationg for "real" programmers. 🙂 comment tag MATLAB Answers — New Questions
Filtering specific wavenumber range in Fourier Transforms result.
Hello. I am currently dealing with the interference signal from the Coherence Scanning interferometer. My plan for processing the signal is as follows:
Applying a discriminator to normalize the signal to the center amplitude at zero,
Zero padding the signal to increase the resolution in the frequency domain.
Doing FFT to convert the interference signal from scanning distance to spatial frequency domain ( um to rad/um).
Filtering out the interested domain ( my light source is 380 nm to 780 nm, so I only care about the range from 8 ~ 17 rad/um).
Calculating and unwrapping the phase from the filtered result.
Compensating the phase with the phase error calculated by material properties.
Doing IFFT with the compensated phase to convert it back to an interference signa
Figure 1. Original phase from interferogram.
Figure 2. Calculated phase error.
The problem is the wavenumber range of the interference signal is 0 to ~ 25 rad/um while the phase error I calculated only supports from 6~30 rad/um. I would like to know if there are any ways to take out entirely then wavenumber range from 8 ~17 rad/um and do the rest of my work on this range. I also shared my code and raw data here.
Thank you all for reading my problem. Hope you guys have a nice weekend.Hello. I am currently dealing with the interference signal from the Coherence Scanning interferometer. My plan for processing the signal is as follows:
Applying a discriminator to normalize the signal to the center amplitude at zero,
Zero padding the signal to increase the resolution in the frequency domain.
Doing FFT to convert the interference signal from scanning distance to spatial frequency domain ( um to rad/um).
Filtering out the interested domain ( my light source is 380 nm to 780 nm, so I only care about the range from 8 ~ 17 rad/um).
Calculating and unwrapping the phase from the filtered result.
Compensating the phase with the phase error calculated by material properties.
Doing IFFT with the compensated phase to convert it back to an interference signa
Figure 1. Original phase from interferogram.
Figure 2. Calculated phase error.
The problem is the wavenumber range of the interference signal is 0 to ~ 25 rad/um while the phase error I calculated only supports from 6~30 rad/um. I would like to know if there are any ways to take out entirely then wavenumber range from 8 ~17 rad/um and do the rest of my work on this range. I also shared my code and raw data here.
Thank you all for reading my problem. Hope you guys have a nice weekend. Hello. I am currently dealing with the interference signal from the Coherence Scanning interferometer. My plan for processing the signal is as follows:
Applying a discriminator to normalize the signal to the center amplitude at zero,
Zero padding the signal to increase the resolution in the frequency domain.
Doing FFT to convert the interference signal from scanning distance to spatial frequency domain ( um to rad/um).
Filtering out the interested domain ( my light source is 380 nm to 780 nm, so I only care about the range from 8 ~ 17 rad/um).
Calculating and unwrapping the phase from the filtered result.
Compensating the phase with the phase error calculated by material properties.
Doing IFFT with the compensated phase to convert it back to an interference signa
Figure 1. Original phase from interferogram.
Figure 2. Calculated phase error.
The problem is the wavenumber range of the interference signal is 0 to ~ 25 rad/um while the phase error I calculated only supports from 6~30 rad/um. I would like to know if there are any ways to take out entirely then wavenumber range from 8 ~17 rad/um and do the rest of my work on this range. I also shared my code and raw data here.
Thank you all for reading my problem. Hope you guys have a nice weekend. fft, signal processing MATLAB Answers — New Questions
Preprocessing PTB-XL dataset in MATLAB
Hello! How can I open specific records from PTB-XL dataset and process them in MATLAB? What I want to do is to first load the ECG leads loaded in .dat file one by one so that I can preprocess them, such as applying digital filters, prior to the creation of composite lead (mixture of 12-lead ECG in one waveform). I have WFDB tool from Physionet. However, it is not working on the dataset. I have the dataset downloaded in my laptop. Thank you!Hello! How can I open specific records from PTB-XL dataset and process them in MATLAB? What I want to do is to first load the ECG leads loaded in .dat file one by one so that I can preprocess them, such as applying digital filters, prior to the creation of composite lead (mixture of 12-lead ECG in one waveform). I have WFDB tool from Physionet. However, it is not working on the dataset. I have the dataset downloaded in my laptop. Thank you! Hello! How can I open specific records from PTB-XL dataset and process them in MATLAB? What I want to do is to first load the ECG leads loaded in .dat file one by one so that I can preprocess them, such as applying digital filters, prior to the creation of composite lead (mixture of 12-lead ECG in one waveform). I have WFDB tool from Physionet. However, it is not working on the dataset. I have the dataset downloaded in my laptop. Thank you! ecg, signal processing, physionet, dataset, wfdb tool MATLAB Answers — New Questions
How do I find the name of the currently-running Matlab LiveScript?
I have a Matlab LiveScript case study which calls many .m functions. At the bottom of the LiveScript, I need to save the results of my case study to a .mat file, and I want the name of the .mat file to be the same as my case study file. For example, if my case study file is named
Case_Something.mlx, then I want the associated results file to be named
Case_Something.mat
I have been relying on the users to change the name of the .mat file for each case they create, but if they forget, they overwrite someone else’s .mat file. If I can recover the name "Case_Something" from the .mlx filename runnning, I can make this automatic. All descriptions of how to do this are examples for .m files, not LiveScripts, and the solutions don’t work.
Is there a way to do this with LiveScripts?
Thanks for any help.I have a Matlab LiveScript case study which calls many .m functions. At the bottom of the LiveScript, I need to save the results of my case study to a .mat file, and I want the name of the .mat file to be the same as my case study file. For example, if my case study file is named
Case_Something.mlx, then I want the associated results file to be named
Case_Something.mat
I have been relying on the users to change the name of the .mat file for each case they create, but if they forget, they overwrite someone else’s .mat file. If I can recover the name "Case_Something" from the .mlx filename runnning, I can make this automatic. All descriptions of how to do this are examples for .m files, not LiveScripts, and the solutions don’t work.
Is there a way to do this with LiveScripts?
Thanks for any help. I have a Matlab LiveScript case study which calls many .m functions. At the bottom of the LiveScript, I need to save the results of my case study to a .mat file, and I want the name of the .mat file to be the same as my case study file. For example, if my case study file is named
Case_Something.mlx, then I want the associated results file to be named
Case_Something.mat
I have been relying on the users to change the name of the .mat file for each case they create, but if they forget, they overwrite someone else’s .mat file. If I can recover the name "Case_Something" from the .mlx filename runnning, I can make this automatic. All descriptions of how to do this are examples for .m files, not LiveScripts, and the solutions don’t work.
Is there a way to do this with LiveScripts?
Thanks for any help. live script, filename, running, save, with same name as MATLAB Answers — New Questions
how can we calculate surface area for this leaf in matlab?
<</matlabcentral/answers/uploaded_files/10685/images.jpg>>
only the leaf<</matlabcentral/answers/uploaded_files/10685/images.jpg>>
only the leaf <</matlabcentral/answers/uploaded_files/10685/images.jpg>>
only the leaf image segmentation, color segmentation, leaf MATLAB Answers — New Questions
MATLAB Web App: Multiple Page survey
I’m trying to make a GUI that takes in answers from multiple study participants. In the GUI, I want the participants to rate multiple audio files based on different questions. I’ve built a basic GUI in App Designer for rating one audio file (with placeholder question titles) and I want it to go to another page with the same structure for rating the subsequent audio files.
I’m a newcomer to MATLAB and needed some pointers on how I could do this. Would I need to create multiple .mlapp for all the audio files and somehow connect them as web apps? I don’t have any experience with working with web servers and databases, so I’m not sure how I would go about in deploying this app for collecting data. Ideally, I would like participants to answer the questions for all audio files (while keeping them anonymous) and save all their responses to a server in form of an excel sheet.
I’ve attached the basic look of the GUI (only for 1 audio) as a screenshot below.I’m trying to make a GUI that takes in answers from multiple study participants. In the GUI, I want the participants to rate multiple audio files based on different questions. I’ve built a basic GUI in App Designer for rating one audio file (with placeholder question titles) and I want it to go to another page with the same structure for rating the subsequent audio files.
I’m a newcomer to MATLAB and needed some pointers on how I could do this. Would I need to create multiple .mlapp for all the audio files and somehow connect them as web apps? I don’t have any experience with working with web servers and databases, so I’m not sure how I would go about in deploying this app for collecting data. Ideally, I would like participants to answer the questions for all audio files (while keeping them anonymous) and save all their responses to a server in form of an excel sheet.
I’ve attached the basic look of the GUI (only for 1 audio) as a screenshot below. I’m trying to make a GUI that takes in answers from multiple study participants. In the GUI, I want the participants to rate multiple audio files based on different questions. I’ve built a basic GUI in App Designer for rating one audio file (with placeholder question titles) and I want it to go to another page with the same structure for rating the subsequent audio files.
I’m a newcomer to MATLAB and needed some pointers on how I could do this. Would I need to create multiple .mlapp for all the audio files and somehow connect them as web apps? I don’t have any experience with working with web servers and databases, so I’m not sure how I would go about in deploying this app for collecting data. Ideally, I would like participants to answer the questions for all audio files (while keeping them anonymous) and save all their responses to a server in form of an excel sheet.
I’ve attached the basic look of the GUI (only for 1 audio) as a screenshot below. database, appdesigner MATLAB Answers — New Questions
Error in server block that is connected to entity generator containing bus elements.
Dear Matlab Experts,
I am having troubles with my model, right now I have designed a model to emulate a single part that goes through operations and maintenance procedures. I am utilizing bus elements in an entity generator, however upon initializing them (file initialize.m) and importing the file directly (file BusProfile.mat), and setting an initial value for each element used in the entity generator tab event actions, I am still encountering this error:
Error in ‘ModelV1/LoadStress’ block. See Service complete action line 15, column 9.
Caused by: This structure does not have a field ‘Missions’; new fields cannot be added when structure has been read or used.
Component:Simulink | Category:Block error
And this error persists for every element that is listed. Any ideas why this happens? I have checked everything up to looking for typos and I am unable to see what is the problem.
Thank you in advance.Dear Matlab Experts,
I am having troubles with my model, right now I have designed a model to emulate a single part that goes through operations and maintenance procedures. I am utilizing bus elements in an entity generator, however upon initializing them (file initialize.m) and importing the file directly (file BusProfile.mat), and setting an initial value for each element used in the entity generator tab event actions, I am still encountering this error:
Error in ‘ModelV1/LoadStress’ block. See Service complete action line 15, column 9.
Caused by: This structure does not have a field ‘Missions’; new fields cannot be added when structure has been read or used.
Component:Simulink | Category:Block error
And this error persists for every element that is listed. Any ideas why this happens? I have checked everything up to looking for typos and I am unable to see what is the problem.
Thank you in advance. Dear Matlab Experts,
I am having troubles with my model, right now I have designed a model to emulate a single part that goes through operations and maintenance procedures. I am utilizing bus elements in an entity generator, however upon initializing them (file initialize.m) and importing the file directly (file BusProfile.mat), and setting an initial value for each element used in the entity generator tab event actions, I am still encountering this error:
Error in ‘ModelV1/LoadStress’ block. See Service complete action line 15, column 9.
Caused by: This structure does not have a field ‘Missions’; new fields cannot be added when structure has been read or used.
Component:Simulink | Category:Block error
And this error persists for every element that is listed. Any ideas why this happens? I have checked everything up to looking for typos and I am unable to see what is the problem.
Thank you in advance. simulink, matlab MATLAB Answers — New Questions