Category: Matlab
Category Archives: Matlab
Is NPRACH Detection Example available only on R2024 version?
Is NPRACH Detection Example available only on R2024 version?Is NPRACH Detection Example available only on R2024 version? Is NPRACH Detection Example available only on R2024 version? lte toolbox, nb-iot, matlab, commnunication toolbox MATLAB Answers — New Questions
How i modified the code so Kb start form Kb_min for first phase but after that it start at Kb_Max . Kindly guide me
How i modified the code so Kb start form Kb_min for first phase but after that it start at Kb_Max . Kindly guide me
type TestCode1.mHow i modified the code so Kb start form Kb_min for first phase but after that it start at Kb_Max . Kindly guide me
type TestCode1.m How i modified the code so Kb start form Kb_min for first phase but after that it start at Kb_Max . Kindly guide me
type TestCode1.m matlab code MATLAB Answers — New Questions
An efficient way to round decimal numbers up to the n-decimal in a cell array
eIs there an efficient way to round decimal numbers up to the n-decimal in a cell array?
In the following example, I would like to round the decimal numbers up to n=2, i.e. to the second decimal:
a = [
{[ 0.235089379668094 0]}
{[0.0793405810870535 0]}
{[ 0.142843392632868 0]}
{[ 0.639081029130393 0]}
{[ 0.970756532033504 0]}
{[ 1 0]}]
My desired output would be the following one:
a = [
{[0.24 0]}
{[0.08 0]}
{[0.14 0]}
{[0.64 0]}
{[0.97 0]}
{[ 1 0]}]eIs there an efficient way to round decimal numbers up to the n-decimal in a cell array?
In the following example, I would like to round the decimal numbers up to n=2, i.e. to the second decimal:
a = [
{[ 0.235089379668094 0]}
{[0.0793405810870535 0]}
{[ 0.142843392632868 0]}
{[ 0.639081029130393 0]}
{[ 0.970756532033504 0]}
{[ 1 0]}]
My desired output would be the following one:
a = [
{[0.24 0]}
{[0.08 0]}
{[0.14 0]}
{[0.64 0]}
{[0.97 0]}
{[ 1 0]}] eIs there an efficient way to round decimal numbers up to the n-decimal in a cell array?
In the following example, I would like to round the decimal numbers up to n=2, i.e. to the second decimal:
a = [
{[ 0.235089379668094 0]}
{[0.0793405810870535 0]}
{[ 0.142843392632868 0]}
{[ 0.639081029130393 0]}
{[ 0.970756532033504 0]}
{[ 1 0]}]
My desired output would be the following one:
a = [
{[0.24 0]}
{[0.08 0]}
{[0.14 0]}
{[0.64 0]}
{[0.97 0]}
{[ 1 0]}] round, decimal, cell, array MATLAB Answers — New Questions
Generation of SPWM waveform with dead-time for a new circuit topology inverter using MATLAB
Hello MathWorks Community,
I am currently working on a project where I need to generate a Sinusoidal Pulse Width Modulation (SPWM) waveform that includes dead-time for a new inverter circuit topology. I intend to use MATLAB for this task, but I am having difficulty figuring out how to get started.
An important aspect of this problem is that the reference signal (sinusoidal) I want to use is not the typical M*sin(ωt), but rather (1/(2-M*sin(ωt))). I would appreciate if you could consider this when giving me advice on how to proceed.
Does MATLAB have built-in functions that can be used for generating such SPWM waveforms? If so, what are these functions and how can they be utilized effectively? Also, are there any recommended methods for handling the dead-time and the peculiar reference waveform in this context?
If you have examples or tutorials that are closely related to this problem, I would be very grateful if you could share them.
Thank you in advance for your support.Hello MathWorks Community,
I am currently working on a project where I need to generate a Sinusoidal Pulse Width Modulation (SPWM) waveform that includes dead-time for a new inverter circuit topology. I intend to use MATLAB for this task, but I am having difficulty figuring out how to get started.
An important aspect of this problem is that the reference signal (sinusoidal) I want to use is not the typical M*sin(ωt), but rather (1/(2-M*sin(ωt))). I would appreciate if you could consider this when giving me advice on how to proceed.
Does MATLAB have built-in functions that can be used for generating such SPWM waveforms? If so, what are these functions and how can they be utilized effectively? Also, are there any recommended methods for handling the dead-time and the peculiar reference waveform in this context?
If you have examples or tutorials that are closely related to this problem, I would be very grateful if you could share them.
Thank you in advance for your support. Hello MathWorks Community,
I am currently working on a project where I need to generate a Sinusoidal Pulse Width Modulation (SPWM) waveform that includes dead-time for a new inverter circuit topology. I intend to use MATLAB for this task, but I am having difficulty figuring out how to get started.
An important aspect of this problem is that the reference signal (sinusoidal) I want to use is not the typical M*sin(ωt), but rather (1/(2-M*sin(ωt))). I would appreciate if you could consider this when giving me advice on how to proceed.
Does MATLAB have built-in functions that can be used for generating such SPWM waveforms? If so, what are these functions and how can they be utilized effectively? Also, are there any recommended methods for handling the dead-time and the peculiar reference waveform in this context?
If you have examples or tutorials that are closely related to this problem, I would be very grateful if you could share them.
Thank you in advance for your support. matlab, spwm, dead-time, inverter, circuit topology, waveform generation MATLAB Answers — New Questions
Matlab Runtime (mcr) new features
I am making a research about the differences, new features, between the MCR versions of 2019(9.6) and 2024(24.1). But I couldn’t find any appropriate website or documentation about it. I need to learn what is new on the current version of MCR. Can you give me a link or anything that can help. Thanks.I am making a research about the differences, new features, between the MCR versions of 2019(9.6) and 2024(24.1). But I couldn’t find any appropriate website or documentation about it. I need to learn what is new on the current version of MCR. Can you give me a link or anything that can help. Thanks. I am making a research about the differences, new features, between the MCR versions of 2019(9.6) and 2024(24.1). But I couldn’t find any appropriate website or documentation about it. I need to learn what is new on the current version of MCR. Can you give me a link or anything that can help. Thanks. #matlabruntime #mcr MATLAB Answers — New Questions
DFT and FFT of Image
Shift the Fourier transform so that it is centered around the middle of your figure and plot the
absolute value of the shifted DFT. Then apply the log transform (log(1 + |DFT|))
and plot your result.
I know that I’m supposed to use fft2 and fftshift. I have the image and this is the code I have this far.
>> X = imread(‘granular_media.jpg’);
>> X1 = double(X(501:700,1401:1600));
>> X2 = double(X(1:200,1:200));
I need to first compute the DFT of the 200×200 subimages that I created. Any help with this?Shift the Fourier transform so that it is centered around the middle of your figure and plot the
absolute value of the shifted DFT. Then apply the log transform (log(1 + |DFT|))
and plot your result.
I know that I’m supposed to use fft2 and fftshift. I have the image and this is the code I have this far.
>> X = imread(‘granular_media.jpg’);
>> X1 = double(X(501:700,1401:1600));
>> X2 = double(X(1:200,1:200));
I need to first compute the DFT of the 200×200 subimages that I created. Any help with this? Shift the Fourier transform so that it is centered around the middle of your figure and plot the
absolute value of the shifted DFT. Then apply the log transform (log(1 + |DFT|))
and plot your result.
I know that I’m supposed to use fft2 and fftshift. I have the image and this is the code I have this far.
>> X = imread(‘granular_media.jpg’);
>> X1 = double(X(501:700,1401:1600));
>> X2 = double(X(1:200,1:200));
I need to first compute the DFT of the 200×200 subimages that I created. Any help with this? image MATLAB Answers — New Questions
Bayesian Optimization in real-time with Simulink and Code Generation
For a particular application, I need to implement Bayesian Optimization so to continuously run in a Simulink model. The simulink model is a control algorithm, which has to be translated into C code, and run on an ECU. The Bayesian Optimization should update the controller parameters (which are the parameters to be optimized) based on a certain cost function, which is directly measured from some sensors available to the ECU. So in practice my cost function should "wait" for a flag "experiment completed" coming from the simulink model; after the flag is generated, the cost function is evaluated based on the data.
More in details, the algorithm idea is something like this:
Perform the experiment by using a certain set of parameters.
After the experiment is done, the cost function for that set of parameters can be evaluated.
Run an iteration of bayesopt() and update the GP model, etc. A new set of parameters is selected through acquisition function.
The experiment is then performed again, and the new cost function is evaluated, and so on…
Now, I know that I can’t directly use bayesopt() in code generation. Is there a way to do this without having to completely rewrite the code for the Bayesian Optimization?For a particular application, I need to implement Bayesian Optimization so to continuously run in a Simulink model. The simulink model is a control algorithm, which has to be translated into C code, and run on an ECU. The Bayesian Optimization should update the controller parameters (which are the parameters to be optimized) based on a certain cost function, which is directly measured from some sensors available to the ECU. So in practice my cost function should "wait" for a flag "experiment completed" coming from the simulink model; after the flag is generated, the cost function is evaluated based on the data.
More in details, the algorithm idea is something like this:
Perform the experiment by using a certain set of parameters.
After the experiment is done, the cost function for that set of parameters can be evaluated.
Run an iteration of bayesopt() and update the GP model, etc. A new set of parameters is selected through acquisition function.
The experiment is then performed again, and the new cost function is evaluated, and so on…
Now, I know that I can’t directly use bayesopt() in code generation. Is there a way to do this without having to completely rewrite the code for the Bayesian Optimization? For a particular application, I need to implement Bayesian Optimization so to continuously run in a Simulink model. The simulink model is a control algorithm, which has to be translated into C code, and run on an ECU. The Bayesian Optimization should update the controller parameters (which are the parameters to be optimized) based on a certain cost function, which is directly measured from some sensors available to the ECU. So in practice my cost function should "wait" for a flag "experiment completed" coming from the simulink model; after the flag is generated, the cost function is evaluated based on the data.
More in details, the algorithm idea is something like this:
Perform the experiment by using a certain set of parameters.
After the experiment is done, the cost function for that set of parameters can be evaluated.
Run an iteration of bayesopt() and update the GP model, etc. A new set of parameters is selected through acquisition function.
The experiment is then performed again, and the new cost function is evaluated, and so on…
Now, I know that I can’t directly use bayesopt() in code generation. Is there a way to do this without having to completely rewrite the code for the Bayesian Optimization? control, optimization, code generation MATLAB Answers — New Questions
Layout scope Matlab online doesn’t work
Hi,
I have a scope with 4 inputs and I would like to show all plots separately, however, the layout option in scope doesn’t work. I’m using Matlab online, I’ve tried Brave, Chrome and Firefox. Any clue how to solve this?
ThanksHi,
I have a scope with 4 inputs and I would like to show all plots separately, however, the layout option in scope doesn’t work. I’m using Matlab online, I’ve tried Brave, Chrome and Firefox. Any clue how to solve this?
Thanks Hi,
I have a scope with 4 inputs and I would like to show all plots separately, however, the layout option in scope doesn’t work. I’m using Matlab online, I’ve tried Brave, Chrome and Firefox. Any clue how to solve this?
Thanks scope, layout MATLAB Answers — New Questions
to develop a MATLAB program for eigenvalue solving using MATRIX ITERATION method
I am trying to create a program which will compute eigenvalue using matrix iteration method. I just know some basic commands and still learning. I have created the following function but I know it has a lot of errors and is not complete. Can anyone plz help
function l = ww(m,k)
for i=1:1000
for j=1:1000
m = [i 0 0;0 2*i 0;0 0 i];
k = [2*j -j 0;-j 7*j -4*j;0 -4*j 5*j];
end
end
n = length(m);
y = [];
x = [];
for i = 1:n % starting vector
x(i) = m(i,1);
end;
l = 0;
blad = k; % starting value of error
while blad>=k
for i = 1:n % A*x
y(i) = 0;
for j = 1:n
y(i) = y(i) + m(i,j)*x(j);
end;
end;
blad = l;
l = 0; % Rayleigh
t = 0;
for i = 1:n
l = l + x(i)*y(i);
t = t + t(i)*x(i);
end;
l = l/t; % eigenvalue
blad = abs(l – blad); % error
x = y;
end;
endI am trying to create a program which will compute eigenvalue using matrix iteration method. I just know some basic commands and still learning. I have created the following function but I know it has a lot of errors and is not complete. Can anyone plz help
function l = ww(m,k)
for i=1:1000
for j=1:1000
m = [i 0 0;0 2*i 0;0 0 i];
k = [2*j -j 0;-j 7*j -4*j;0 -4*j 5*j];
end
end
n = length(m);
y = [];
x = [];
for i = 1:n % starting vector
x(i) = m(i,1);
end;
l = 0;
blad = k; % starting value of error
while blad>=k
for i = 1:n % A*x
y(i) = 0;
for j = 1:n
y(i) = y(i) + m(i,j)*x(j);
end;
end;
blad = l;
l = 0; % Rayleigh
t = 0;
for i = 1:n
l = l + x(i)*y(i);
t = t + t(i)*x(i);
end;
l = l/t; % eigenvalue
blad = abs(l – blad); % error
x = y;
end;
end I am trying to create a program which will compute eigenvalue using matrix iteration method. I just know some basic commands and still learning. I have created the following function but I know it has a lot of errors and is not complete. Can anyone plz help
function l = ww(m,k)
for i=1:1000
for j=1:1000
m = [i 0 0;0 2*i 0;0 0 i];
k = [2*j -j 0;-j 7*j -4*j;0 -4*j 5*j];
end
end
n = length(m);
y = [];
x = [];
for i = 1:n % starting vector
x(i) = m(i,1);
end;
l = 0;
blad = k; % starting value of error
while blad>=k
for i = 1:n % A*x
y(i) = 0;
for j = 1:n
y(i) = y(i) + m(i,j)*x(j);
end;
end;
blad = l;
l = 0; % Rayleigh
t = 0;
for i = 1:n
l = l + x(i)*y(i);
t = t + t(i)*x(i);
end;
l = l/t; % eigenvalue
blad = abs(l – blad); % error
x = y;
end;
end matrix iteration, eigenvalue MATLAB Answers — New Questions
How can I use the iswt2 from the wavelet toolbox with a different dwtmode?
The iswt2 is the inverse function of the swt2. In the swt2 the dwtmode is set to:
modeDWT = ‘per’;
I want to customize the swt2 to extend images in a symmetric manner, so changed the code to:
modeDWT = ‘sym’;
Unfortunately, I have not found an explicit parameter to consider the dwtmode in the iswt2. Is there a way to modify the iswt2 in this respect?The iswt2 is the inverse function of the swt2. In the swt2 the dwtmode is set to:
modeDWT = ‘per’;
I want to customize the swt2 to extend images in a symmetric manner, so changed the code to:
modeDWT = ‘sym’;
Unfortunately, I have not found an explicit parameter to consider the dwtmode in the iswt2. Is there a way to modify the iswt2 in this respect? The iswt2 is the inverse function of the swt2. In the swt2 the dwtmode is set to:
modeDWT = ‘per’;
I want to customize the swt2 to extend images in a symmetric manner, so changed the code to:
modeDWT = ‘sym’;
Unfortunately, I have not found an explicit parameter to consider the dwtmode in the iswt2. Is there a way to modify the iswt2 in this respect? wavelet, signal processing, image processing MATLAB Answers — New Questions
solution for steady flow at Re = 10. in coursera i took mathematics for engineers.for that i need to solve an assignment. For this code i cant get correct stream & vorticity
flow_around_cylinder_steady
function [psi, omega] = flow_around_cylinder_steady
Re=10;
%%%%% define the grid %%%%%
n=101; m=101; % number of grid points
N=n-1; M=m-1; % number of grid intervals
h=pi/M; % grid spacing based on theta variable
xi=(0:N)*h; theta=(0:M)*h; % xi and theta variables on the grid
%%%%% Initialize the flow fields %%%%%
psi=zeros(n,m);
omega=zeros(n,m);
psi(n,:)=0 % Free stream boundary condition (psi = 0 at the top edge)
%%%%% Set relax params, tol, extra variables %%%%%
r_psi=1.8; % Set the relaxation parameter here, psi equation
r_omega=0.9; % Set the relaxation parameter here, omega equation
delta=1.e-08; % error tolerance
error=2*delta; % initialize error variable
%%%%% Add any additional variable definitions here %%%%%
…
…
%%%%% Main SOR Loop %%%%%
while (error > delta)
psi_old = psi; omega_old = omega;
for i=2:n-1
for j=2:m-1
psi(i,j)=… % (1 – r_psi) * psi_old(i, j) + …
r_psi * 0.5 * (psi_old(i+1, j) + psi_old(i-1, j) + …
psi_old(i, j+1) + psi_old(i, j-1) – h^2 * omega(i, j));
end
end
error_psi=max(abs(psi(:)-psi_old(:)));
omega(1,:)=0 % Boundary condition at theta = 0
for i=2:n-1
for j=2:m-1
omega(i,j)=… % (1 – r_omega) * omega_old(i, j) + …
r_omega * ( (omega_old(i+1, j) + omega_old(i-1, j) + …
omega_old(i, j+1) + omega_old(i, j-1) – …
(4 – (2/h^2)) * omega_old(i, j)) / (4 – (2/h^2)) );
end
end
error_omega=max(abs(omega(:)-omega_old(:)));
error=max(error_psi, error_omega);
end
plot_Re10(psi);
end
Please refer to page 59 (64/69) of the PDF document for the ‘plot_Re10’ custom plotting function.
https://www.math.hkust.edu.hk/~machas/flow-around-a-cylinder.pdfflow_around_cylinder_steady
function [psi, omega] = flow_around_cylinder_steady
Re=10;
%%%%% define the grid %%%%%
n=101; m=101; % number of grid points
N=n-1; M=m-1; % number of grid intervals
h=pi/M; % grid spacing based on theta variable
xi=(0:N)*h; theta=(0:M)*h; % xi and theta variables on the grid
%%%%% Initialize the flow fields %%%%%
psi=zeros(n,m);
omega=zeros(n,m);
psi(n,:)=0 % Free stream boundary condition (psi = 0 at the top edge)
%%%%% Set relax params, tol, extra variables %%%%%
r_psi=1.8; % Set the relaxation parameter here, psi equation
r_omega=0.9; % Set the relaxation parameter here, omega equation
delta=1.e-08; % error tolerance
error=2*delta; % initialize error variable
%%%%% Add any additional variable definitions here %%%%%
…
…
%%%%% Main SOR Loop %%%%%
while (error > delta)
psi_old = psi; omega_old = omega;
for i=2:n-1
for j=2:m-1
psi(i,j)=… % (1 – r_psi) * psi_old(i, j) + …
r_psi * 0.5 * (psi_old(i+1, j) + psi_old(i-1, j) + …
psi_old(i, j+1) + psi_old(i, j-1) – h^2 * omega(i, j));
end
end
error_psi=max(abs(psi(:)-psi_old(:)));
omega(1,:)=0 % Boundary condition at theta = 0
for i=2:n-1
for j=2:m-1
omega(i,j)=… % (1 – r_omega) * omega_old(i, j) + …
r_omega * ( (omega_old(i+1, j) + omega_old(i-1, j) + …
omega_old(i, j+1) + omega_old(i, j-1) – …
(4 – (2/h^2)) * omega_old(i, j)) / (4 – (2/h^2)) );
end
end
error_omega=max(abs(omega(:)-omega_old(:)));
error=max(error_psi, error_omega);
end
plot_Re10(psi);
end
Please refer to page 59 (64/69) of the PDF document for the ‘plot_Re10’ custom plotting function.
https://www.math.hkust.edu.hk/~machas/flow-around-a-cylinder.pdf flow_around_cylinder_steady
function [psi, omega] = flow_around_cylinder_steady
Re=10;
%%%%% define the grid %%%%%
n=101; m=101; % number of grid points
N=n-1; M=m-1; % number of grid intervals
h=pi/M; % grid spacing based on theta variable
xi=(0:N)*h; theta=(0:M)*h; % xi and theta variables on the grid
%%%%% Initialize the flow fields %%%%%
psi=zeros(n,m);
omega=zeros(n,m);
psi(n,:)=0 % Free stream boundary condition (psi = 0 at the top edge)
%%%%% Set relax params, tol, extra variables %%%%%
r_psi=1.8; % Set the relaxation parameter here, psi equation
r_omega=0.9; % Set the relaxation parameter here, omega equation
delta=1.e-08; % error tolerance
error=2*delta; % initialize error variable
%%%%% Add any additional variable definitions here %%%%%
…
…
%%%%% Main SOR Loop %%%%%
while (error > delta)
psi_old = psi; omega_old = omega;
for i=2:n-1
for j=2:m-1
psi(i,j)=… % (1 – r_psi) * psi_old(i, j) + …
r_psi * 0.5 * (psi_old(i+1, j) + psi_old(i-1, j) + …
psi_old(i, j+1) + psi_old(i, j-1) – h^2 * omega(i, j));
end
end
error_psi=max(abs(psi(:)-psi_old(:)));
omega(1,:)=0 % Boundary condition at theta = 0
for i=2:n-1
for j=2:m-1
omega(i,j)=… % (1 – r_omega) * omega_old(i, j) + …
r_omega * ( (omega_old(i+1, j) + omega_old(i-1, j) + …
omega_old(i, j+1) + omega_old(i, j-1) – …
(4 – (2/h^2)) * omega_old(i, j)) / (4 – (2/h^2)) );
end
end
error_omega=max(abs(omega(:)-omega_old(:)));
error=max(error_psi, error_omega);
end
plot_Re10(psi);
end
Please refer to page 59 (64/69) of the PDF document for the ‘plot_Re10’ custom plotting function.
https://www.math.hkust.edu.hk/~machas/flow-around-a-cylinder.pdf matlab, steady flow MATLAB Answers — New Questions
How to change .txt format automatically into .m format
Dear all:
I have a lot of .txt files which I want to change them automatically into .m format files, in order for some later processing in Matlab.
Any guide will be very appreciated.Dear all:
I have a lot of .txt files which I want to change them automatically into .m format files, in order for some later processing in Matlab.
Any guide will be very appreciated. Dear all:
I have a lot of .txt files which I want to change them automatically into .m format files, in order for some later processing in Matlab.
Any guide will be very appreciated. txt, m, format, function, convert, change, text, m file, txt file MATLAB Answers — New Questions
dealing with and / (windows vs. unix) for path definition.
Hi everybody,
Simple question, let’s say I’m using mac osx and some colleagues use windows… and I have to share a matlab script. Problem, this script needs to look in folder to load data files or print figures:
load ./data/data.mat
plot(data(:,1),data(:,2))
print -dpdf ./graph/figure.pdf
this is how it is written on unix system, but on windows I have to replace all the / by
load .datadata.mat
…
Is there a way to deal with that or the only way to make it works on both systems is to add a conditional statement like
if isunix
load ./data/data.mat
else
load .datadata.mat
end
thanks for any help,
cheers
PieterHi everybody,
Simple question, let’s say I’m using mac osx and some colleagues use windows… and I have to share a matlab script. Problem, this script needs to look in folder to load data files or print figures:
load ./data/data.mat
plot(data(:,1),data(:,2))
print -dpdf ./graph/figure.pdf
this is how it is written on unix system, but on windows I have to replace all the / by
load .datadata.mat
…
Is there a way to deal with that or the only way to make it works on both systems is to add a conditional statement like
if isunix
load ./data/data.mat
else
load .datadata.mat
end
thanks for any help,
cheers
Pieter Hi everybody,
Simple question, let’s say I’m using mac osx and some colleagues use windows… and I have to share a matlab script. Problem, this script needs to look in folder to load data files or print figures:
load ./data/data.mat
plot(data(:,1),data(:,2))
print -dpdf ./graph/figure.pdf
this is how it is written on unix system, but on windows I have to replace all the / by
load .datadata.mat
…
Is there a way to deal with that or the only way to make it works on both systems is to add a conditional statement like
if isunix
load ./data/data.mat
else
load .datadata.mat
end
thanks for any help,
cheers
Pieter unix windows path dir MATLAB Answers — New Questions
Normal Distribution of the CDF Error Function Plotting
What command do I need to enter to plot:
f(z) = 794.5 (1 + erf((x – 97.69760856)/(25.85046741√2)))What command do I need to enter to plot:
f(z) = 794.5 (1 + erf((x – 97.69760856)/(25.85046741√2))) What command do I need to enter to plot:
f(z) = 794.5 (1 + erf((x – 97.69760856)/(25.85046741√2))) error function MATLAB Answers — New Questions
Appdesigner: Remove Simulink dependency
Hi everybody,
I have accidentaly added a Simulink component to my app and now I cannot compile it anymore.
I have the MATLAB compiler but not the Simulink compiler, to overcome the problem I have removed the simulink component but the dependency is still there, hence the appdesigner does not allow me to compile the app.
Is there any trick that I can use to fix this problem?
Best regards,
GiulioHi everybody,
I have accidentaly added a Simulink component to my app and now I cannot compile it anymore.
I have the MATLAB compiler but not the Simulink compiler, to overcome the problem I have removed the simulink component but the dependency is still there, hence the appdesigner does not allow me to compile the app.
Is there any trick that I can use to fix this problem?
Best regards,
Giulio Hi everybody,
I have accidentaly added a Simulink component to my app and now I cannot compile it anymore.
I have the MATLAB compiler but not the Simulink compiler, to overcome the problem I have removed the simulink component but the dependency is still there, hence the appdesigner does not allow me to compile the app.
Is there any trick that I can use to fix this problem?
Best regards,
Giulio appdesigner, compiler, dependency MATLAB Answers — New Questions
Anova-N output question
Hello community!
The closest prompt I could find that is similar to this would be: https://www.mathworks.com/matlabcentral/answers/1876737-anova-n-outputs-as-not-full-rank-returns-nan-p-value?s_tid=sug_su , but the reason their’s showed NaN was there was not enough values. For mine I have 5.4 thousand entries, so I’m not sure that is the problem.
To reduce clutter of the code, I am going to attach the .mat files and the one-line of code.
pTHalf = anovan(stats(:,1), {Patho CellLine MW},’model’,’interaction’,’varnames’, …
{‘Pathology’,’Cell Line’,’Molecular Weights’});
I ensured the data is of the same types allowed within the format of the Anova-n overview page. The only thing that I could think of was that there are more than two groups within the Cell Line and Molecular Weights groupings, but the only one that worked was the molecular weights, so I also doubt that is the reason.
This is the output below. Why do I have missing sections associated with a ‘not full rank’. I do not see anything on the anova-N page that discusses this.
Thanks community!
NickHello community!
The closest prompt I could find that is similar to this would be: https://www.mathworks.com/matlabcentral/answers/1876737-anova-n-outputs-as-not-full-rank-returns-nan-p-value?s_tid=sug_su , but the reason their’s showed NaN was there was not enough values. For mine I have 5.4 thousand entries, so I’m not sure that is the problem.
To reduce clutter of the code, I am going to attach the .mat files and the one-line of code.
pTHalf = anovan(stats(:,1), {Patho CellLine MW},’model’,’interaction’,’varnames’, …
{‘Pathology’,’Cell Line’,’Molecular Weights’});
I ensured the data is of the same types allowed within the format of the Anova-n overview page. The only thing that I could think of was that there are more than two groups within the Cell Line and Molecular Weights groupings, but the only one that worked was the molecular weights, so I also doubt that is the reason.
This is the output below. Why do I have missing sections associated with a ‘not full rank’. I do not see anything on the anova-N page that discusses this.
Thanks community!
Nick Hello community!
The closest prompt I could find that is similar to this would be: https://www.mathworks.com/matlabcentral/answers/1876737-anova-n-outputs-as-not-full-rank-returns-nan-p-value?s_tid=sug_su , but the reason their’s showed NaN was there was not enough values. For mine I have 5.4 thousand entries, so I’m not sure that is the problem.
To reduce clutter of the code, I am going to attach the .mat files and the one-line of code.
pTHalf = anovan(stats(:,1), {Patho CellLine MW},’model’,’interaction’,’varnames’, …
{‘Pathology’,’Cell Line’,’Molecular Weights’});
I ensured the data is of the same types allowed within the format of the Anova-n overview page. The only thing that I could think of was that there are more than two groups within the Cell Line and Molecular Weights groupings, but the only one that worked was the molecular weights, so I also doubt that is the reason.
This is the output below. Why do I have missing sections associated with a ‘not full rank’. I do not see anything on the anova-N page that discusses this.
Thanks community!
Nick anova-n, matlab, documentation MATLAB Answers — New Questions
Facing error in this example openExample(‘whdl/WHDLOFDMTransmitterExample’)
>>
openExample(‘whdl/WHDLOFDMTransmitterExample’)
runOFDMTransmitterModel
Error using runOFDMTransmitterModel>trBlkSize
Too many output arguments.
Error in runOFDMTransmitterModel (line 26)
trBlkSize(txParam(n).modOrder,txParam(n).codeRateIndex)*txParam(n).numFrames,…Error using runOFDMTransmitterModel>trBlkSizeToo many output arguments.Error in runOFDMTransmitterModel (line 26) trBlkSize(txParam(n).modOrder,txParam(n).codeRateIndex)*txParam(n).numFrames,…
I am gretting this error before I was not getting . can you help me.>>
openExample(‘whdl/WHDLOFDMTransmitterExample’)
runOFDMTransmitterModel
Error using runOFDMTransmitterModel>trBlkSize
Too many output arguments.
Error in runOFDMTransmitterModel (line 26)
trBlkSize(txParam(n).modOrder,txParam(n).codeRateIndex)*txParam(n).numFrames,…Error using runOFDMTransmitterModel>trBlkSizeToo many output arguments.Error in runOFDMTransmitterModel (line 26) trBlkSize(txParam(n).modOrder,txParam(n).codeRateIndex)*txParam(n).numFrames,…
I am gretting this error before I was not getting . can you help me. >>
openExample(‘whdl/WHDLOFDMTransmitterExample’)
runOFDMTransmitterModel
Error using runOFDMTransmitterModel>trBlkSize
Too many output arguments.
Error in runOFDMTransmitterModel (line 26)
trBlkSize(txParam(n).modOrder,txParam(n).codeRateIndex)*txParam(n).numFrames,…Error using runOFDMTransmitterModel>trBlkSizeToo many output arguments.Error in runOFDMTransmitterModel (line 26) trBlkSize(txParam(n).modOrder,txParam(n).codeRateIndex)*txParam(n).numFrames,…
I am gretting this error before I was not getting . can you help me. #matlab#hdl MATLAB Answers — New Questions
Bear tool box and input excel
While I am using the Bear toolbox to run time varying parameter model. I am bit confused how can I make my excel sheet to be recognized by the bear app. I import my own excel sheet that I used to collect data and every time I click a run button it says something like exo mean priors not found or something similar to this. I assume there is an excel sheet format that I am supposed to use in bear toolbox but I cannot really find it anywhere. Can anyone help me out?
For your reference: https://www.ecb.europa.eu/press/research-publications/working-papers/html/BEAR_toolbox_v5_1.pdf –> the slide 22 talks about input excel data file but I am confused.While I am using the Bear toolbox to run time varying parameter model. I am bit confused how can I make my excel sheet to be recognized by the bear app. I import my own excel sheet that I used to collect data and every time I click a run button it says something like exo mean priors not found or something similar to this. I assume there is an excel sheet format that I am supposed to use in bear toolbox but I cannot really find it anywhere. Can anyone help me out?
For your reference: https://www.ecb.europa.eu/press/research-publications/working-papers/html/BEAR_toolbox_v5_1.pdf –> the slide 22 talks about input excel data file but I am confused. While I am using the Bear toolbox to run time varying parameter model. I am bit confused how can I make my excel sheet to be recognized by the bear app. I import my own excel sheet that I used to collect data and every time I click a run button it says something like exo mean priors not found or something similar to this. I assume there is an excel sheet format that I am supposed to use in bear toolbox but I cannot really find it anywhere. Can anyone help me out?
For your reference: https://www.ecb.europa.eu/press/research-publications/working-papers/html/BEAR_toolbox_v5_1.pdf –> the slide 22 talks about input excel data file but I am confused. bear toolbox, ecb, excel sheet MATLAB Answers — New Questions
How can I update base body transformation matrix during visualization using ‘show’ function?
To visualize the rigidbody tree model from urdf file, the ‘show’ function can be used. However, it supports to set the base body position (x,y,z) and yaw angle, only… I want to arbitrary set the base body position and orientation.
For a internal function in the robotics toolbox, there is a little comment to use 6-DOF xyz & roll, ptich, yaw, thereby obtaining whole base body transformation matrix. But, the strict support does not provide or activate them.
How can I set arbitrary base body transformation matrix of rigidbody tree? I have to simulate the base body trasnform almost real-time, therefore I don’t want to add and remove body during simulation.To visualize the rigidbody tree model from urdf file, the ‘show’ function can be used. However, it supports to set the base body position (x,y,z) and yaw angle, only… I want to arbitrary set the base body position and orientation.
For a internal function in the robotics toolbox, there is a little comment to use 6-DOF xyz & roll, ptich, yaw, thereby obtaining whole base body transformation matrix. But, the strict support does not provide or activate them.
How can I set arbitrary base body transformation matrix of rigidbody tree? I have to simulate the base body trasnform almost real-time, therefore I don’t want to add and remove body during simulation. To visualize the rigidbody tree model from urdf file, the ‘show’ function can be used. However, it supports to set the base body position (x,y,z) and yaw angle, only… I want to arbitrary set the base body position and orientation.
For a internal function in the robotics toolbox, there is a little comment to use 6-DOF xyz & roll, ptich, yaw, thereby obtaining whole base body transformation matrix. But, the strict support does not provide or activate them.
How can I set arbitrary base body transformation matrix of rigidbody tree? I have to simulate the base body trasnform almost real-time, therefore I don’t want to add and remove body during simulation. robotics tool box, base body transformation update MATLAB Answers — New Questions
How should I structure the neural net based on my given input and output training data
I am trying to design a feedforward network that trains on a 4×5 matrix (5 samples of 4 separate inputs into the neural network) and its outputs are represented by a 4x5x1000 matrix (5 samples of 4 outputs where each component of the 4×1 output vector has 1000 points). This neural net is used to determine an optimal trajectory for a given terminal condition from a set of the same initial conditions . The code for this project will be placed below:
%% Neural Net Training Process
% Initial State
x1 = [0;0]; % Initial Positions
x2 = [1;1]; % Initial Velocities
xo = [x1;x2]; % 4×1 Initial State Vector
% Parsing Training Input Data
x_input = [xf1,xf2,xf4,xf5,xf6]; % 4×5 Terminal State Vector (each xf (4×1) represents a different terminal condition)
% Parsing Training Output Data
x_output = [];
for i=1:4
x_output(i,1,:) = x1(:,i);
x_output(i,2,:) = x2(:,i);
x_output(i,3,:) = x4(:,i);
x_output(i,4,:) = x5(:,i);
x_output(i,5,:) = x6(:,i);
end % 4x5x1000 Terminal State Matrix
% Parsing Validation Data
xf_valid = xf3;
x_valid = x3′;
% Neural Net Architecture Initialization
netconfig = 40;
net = feedforwardnet(netconfig);
net.numInputs = 4;
% Training the Network
for j=1:5
curr_xin = x_input(:,j);
curr_xout = x_output(:,j,:);
net = train(net,curr_xin,curr_xout);
end
From here, I am receieve an error in line 89, where I get the following error: Error using nntraining.setup>setupPerWorker (line 96)
Targets T is not two-dimensional. Any advice from here would be appreciated. Thanks.I am trying to design a feedforward network that trains on a 4×5 matrix (5 samples of 4 separate inputs into the neural network) and its outputs are represented by a 4x5x1000 matrix (5 samples of 4 outputs where each component of the 4×1 output vector has 1000 points). This neural net is used to determine an optimal trajectory for a given terminal condition from a set of the same initial conditions . The code for this project will be placed below:
%% Neural Net Training Process
% Initial State
x1 = [0;0]; % Initial Positions
x2 = [1;1]; % Initial Velocities
xo = [x1;x2]; % 4×1 Initial State Vector
% Parsing Training Input Data
x_input = [xf1,xf2,xf4,xf5,xf6]; % 4×5 Terminal State Vector (each xf (4×1) represents a different terminal condition)
% Parsing Training Output Data
x_output = [];
for i=1:4
x_output(i,1,:) = x1(:,i);
x_output(i,2,:) = x2(:,i);
x_output(i,3,:) = x4(:,i);
x_output(i,4,:) = x5(:,i);
x_output(i,5,:) = x6(:,i);
end % 4x5x1000 Terminal State Matrix
% Parsing Validation Data
xf_valid = xf3;
x_valid = x3′;
% Neural Net Architecture Initialization
netconfig = 40;
net = feedforwardnet(netconfig);
net.numInputs = 4;
% Training the Network
for j=1:5
curr_xin = x_input(:,j);
curr_xout = x_output(:,j,:);
net = train(net,curr_xin,curr_xout);
end
From here, I am receieve an error in line 89, where I get the following error: Error using nntraining.setup>setupPerWorker (line 96)
Targets T is not two-dimensional. Any advice from here would be appreciated. Thanks. I am trying to design a feedforward network that trains on a 4×5 matrix (5 samples of 4 separate inputs into the neural network) and its outputs are represented by a 4x5x1000 matrix (5 samples of 4 outputs where each component of the 4×1 output vector has 1000 points). This neural net is used to determine an optimal trajectory for a given terminal condition from a set of the same initial conditions . The code for this project will be placed below:
%% Neural Net Training Process
% Initial State
x1 = [0;0]; % Initial Positions
x2 = [1;1]; % Initial Velocities
xo = [x1;x2]; % 4×1 Initial State Vector
% Parsing Training Input Data
x_input = [xf1,xf2,xf4,xf5,xf6]; % 4×5 Terminal State Vector (each xf (4×1) represents a different terminal condition)
% Parsing Training Output Data
x_output = [];
for i=1:4
x_output(i,1,:) = x1(:,i);
x_output(i,2,:) = x2(:,i);
x_output(i,3,:) = x4(:,i);
x_output(i,4,:) = x5(:,i);
x_output(i,5,:) = x6(:,i);
end % 4x5x1000 Terminal State Matrix
% Parsing Validation Data
xf_valid = xf3;
x_valid = x3′;
% Neural Net Architecture Initialization
netconfig = 40;
net = feedforwardnet(netconfig);
net.numInputs = 4;
% Training the Network
for j=1:5
curr_xin = x_input(:,j);
curr_xout = x_output(:,j,:);
net = train(net,curr_xin,curr_xout);
end
From here, I am receieve an error in line 89, where I get the following error: Error using nntraining.setup>setupPerWorker (line 96)
Targets T is not two-dimensional. Any advice from here would be appreciated. Thanks. neural network, feedforwardnet, control, matlab MATLAB Answers — New Questions