Tag Archives: matlab
please check my block diagram reduction to get transfer function.
Hello. I have a problem with block diagram.
I have to find transfer fuction of given block diagram with hand writting. Ive tried using block diagram reduction rule and I got a transfer fuction. and Ive plotted step response of transfer fuction I found to check either I did right or not. also I made same block diagram on my simulink to simulate. I compared both step response graphs. they are different. I didnt analysis both graphs in detail, but it looks pretty same shape. the different thing is value. of course, both graph might have different shape. because it is just my intuition. whatever, I attached my result of transfer fuction and given block diagram and each block’s value. and step response aswell. actually I put 4 for final value of step input. cause this is given value.
<</matlabcentral/answers/uploaded_files/53080/block%20diagram.png>>
<</matlabcentral/answers/uploaded_files/53083/compare%20graph.png>>
these are two step response graph. left one is from transfer function that I found by hand calculate. and right one is from simulink. to get left one I put code below. and you could know what I get as transfer function aswell.
num=[110.7 110.7 26.568];
den=[43.356 104.0450826 78.3535413 18.7056];
sys=tf(num,den);
t=0:0.1:8;
opt=stepDataOptions(‘StepAmplitude’,4);
y=step(sys,t,opt);
plot(t,y);
grid on;
<</matlabcentral/answers/uploaded_files/53085/parameter.png>>
these are parameters I got.
just in case I write how I simplified or reduce block diagram to get transfer function. first I moved r/itot block to the right of the point. and also multipied with block which value is 0.6154. and using feedback transfer fuction,(forward path gain)/(1+loopgain), I reduced block diagram. in the halfway of this process I moved armature current node to the far right to use feedback transfer function. of course it need to add block to multiply with current sensor sensitivity. and then I just kept going reduction.
please let me know what I did wrong. if any question or need more information to help me let me know aswell.
Thank you.Hello. I have a problem with block diagram.
I have to find transfer fuction of given block diagram with hand writting. Ive tried using block diagram reduction rule and I got a transfer fuction. and Ive plotted step response of transfer fuction I found to check either I did right or not. also I made same block diagram on my simulink to simulate. I compared both step response graphs. they are different. I didnt analysis both graphs in detail, but it looks pretty same shape. the different thing is value. of course, both graph might have different shape. because it is just my intuition. whatever, I attached my result of transfer fuction and given block diagram and each block’s value. and step response aswell. actually I put 4 for final value of step input. cause this is given value.
<</matlabcentral/answers/uploaded_files/53080/block%20diagram.png>>
<</matlabcentral/answers/uploaded_files/53083/compare%20graph.png>>
these are two step response graph. left one is from transfer function that I found by hand calculate. and right one is from simulink. to get left one I put code below. and you could know what I get as transfer function aswell.
num=[110.7 110.7 26.568];
den=[43.356 104.0450826 78.3535413 18.7056];
sys=tf(num,den);
t=0:0.1:8;
opt=stepDataOptions(‘StepAmplitude’,4);
y=step(sys,t,opt);
plot(t,y);
grid on;
<</matlabcentral/answers/uploaded_files/53085/parameter.png>>
these are parameters I got.
just in case I write how I simplified or reduce block diagram to get transfer function. first I moved r/itot block to the right of the point. and also multipied with block which value is 0.6154. and using feedback transfer fuction,(forward path gain)/(1+loopgain), I reduced block diagram. in the halfway of this process I moved armature current node to the far right to use feedback transfer function. of course it need to add block to multiply with current sensor sensitivity. and then I just kept going reduction.
please let me know what I did wrong. if any question or need more information to help me let me know aswell.
Thank you. Hello. I have a problem with block diagram.
I have to find transfer fuction of given block diagram with hand writting. Ive tried using block diagram reduction rule and I got a transfer fuction. and Ive plotted step response of transfer fuction I found to check either I did right or not. also I made same block diagram on my simulink to simulate. I compared both step response graphs. they are different. I didnt analysis both graphs in detail, but it looks pretty same shape. the different thing is value. of course, both graph might have different shape. because it is just my intuition. whatever, I attached my result of transfer fuction and given block diagram and each block’s value. and step response aswell. actually I put 4 for final value of step input. cause this is given value.
<</matlabcentral/answers/uploaded_files/53080/block%20diagram.png>>
<</matlabcentral/answers/uploaded_files/53083/compare%20graph.png>>
these are two step response graph. left one is from transfer function that I found by hand calculate. and right one is from simulink. to get left one I put code below. and you could know what I get as transfer function aswell.
num=[110.7 110.7 26.568];
den=[43.356 104.0450826 78.3535413 18.7056];
sys=tf(num,den);
t=0:0.1:8;
opt=stepDataOptions(‘StepAmplitude’,4);
y=step(sys,t,opt);
plot(t,y);
grid on;
<</matlabcentral/answers/uploaded_files/53085/parameter.png>>
these are parameters I got.
just in case I write how I simplified or reduce block diagram to get transfer function. first I moved r/itot block to the right of the point. and also multipied with block which value is 0.6154. and using feedback transfer fuction,(forward path gain)/(1+loopgain), I reduced block diagram. in the halfway of this process I moved armature current node to the far right to use feedback transfer function. of course it need to add block to multiply with current sensor sensitivity. and then I just kept going reduction.
please let me know what I did wrong. if any question or need more information to help me let me know aswell.
Thank you. block diagram, block diagram reduction rules, transfer function MATLAB Answers — New Questions
Platform MACA64 not recognized error
I recently started getting errors in Matlab stating: "Platform MACA64 not recognized". This happens when opening a script file to edit or executing a script.
In this example the error occurs in my script when it calls audioread (myFileName). The error occurs in the bowels of audioread which is of course a builtin function, so it’s strange that it doesn’t work.
Error using audioread>readaudio (line 181)
Platform MACA64 not recognized.
Error in audioread (line 160)
[y, Fs] = readaudio (filename, range, datatype);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Deconv (line 5)
[invSweep, Fs1] = audioread (myFileName));
This example occurs when opening a script to edit.
I’m running on a Macbook with Apple Silicon (M2). I tried reinstalling Matlab by first deleting the Matlab Applications file and the Mathworks Application Support folder but that didn’t seem to make a difference. I even tried installing the Intel version and running with Rosetta but I get the same error except instead of MACA64 it says MACI64.
One other possibly related thing is some functions such as audioread are not found in the commandline help even though I can execute these commands.
>> help audioread
audioread not found.
Search the documentation for audioread
Any ideas?I recently started getting errors in Matlab stating: "Platform MACA64 not recognized". This happens when opening a script file to edit or executing a script.
In this example the error occurs in my script when it calls audioread (myFileName). The error occurs in the bowels of audioread which is of course a builtin function, so it’s strange that it doesn’t work.
Error using audioread>readaudio (line 181)
Platform MACA64 not recognized.
Error in audioread (line 160)
[y, Fs] = readaudio (filename, range, datatype);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Deconv (line 5)
[invSweep, Fs1] = audioread (myFileName));
This example occurs when opening a script to edit.
I’m running on a Macbook with Apple Silicon (M2). I tried reinstalling Matlab by first deleting the Matlab Applications file and the Mathworks Application Support folder but that didn’t seem to make a difference. I even tried installing the Intel version and running with Rosetta but I get the same error except instead of MACA64 it says MACI64.
One other possibly related thing is some functions such as audioread are not found in the commandline help even though I can execute these commands.
>> help audioread
audioread not found.
Search the documentation for audioread
Any ideas? I recently started getting errors in Matlab stating: "Platform MACA64 not recognized". This happens when opening a script file to edit or executing a script.
In this example the error occurs in my script when it calls audioread (myFileName). The error occurs in the bowels of audioread which is of course a builtin function, so it’s strange that it doesn’t work.
Error using audioread>readaudio (line 181)
Platform MACA64 not recognized.
Error in audioread (line 160)
[y, Fs] = readaudio (filename, range, datatype);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Deconv (line 5)
[invSweep, Fs1] = audioread (myFileName));
This example occurs when opening a script to edit.
I’m running on a Macbook with Apple Silicon (M2). I tried reinstalling Matlab by first deleting the Matlab Applications file and the Mathworks Application Support folder but that didn’t seem to make a difference. I even tried installing the Intel version and running with Rosetta but I get the same error except instead of MACA64 it says MACI64.
One other possibly related thing is some functions such as audioread are not found in the commandline help even though I can execute these commands.
>> help audioread
audioread not found.
Search the documentation for audioread
Any ideas? error, platform maca64 MATLAB Answers — New Questions
Can anybody help in how to proceed with this
Post Content Post Content simulink, simulink 3d animation, simulation 3d vehicle with ground following, simulation 3d scene configuration MATLAB Answers — New Questions
Why are the results of the three-way ANOVA all Nan ?
%the 4 numbers in each row correspond to the methods ‘A’; ‘B’; ‘C’ and ‘Alt’
%low iq with break
productivity_scores_li_yb = [
4.4 3.4 2.4 3.9;
4.1 3.8 1.8 2.7;
3.8 4.3 1.7 2.1;
4.4 4.4 1.9 2.6;
4.7 3.6 2.5 2.4;
3.3 3.9 2.0 3.2;
3.8 3.9 2.3 2.5;
4.3 2.8 2.5 3.5;
4.9 3.3 2.3 3.6;
3.8 4.0 1.8 2.9;
];
%high iq with break
productivity_scores_hi_yb = [
3.5 4.2 3.7 2.2;
3.7 4.2 2.4 1.4;
4.9 4.2 2.8 1.8;
3.5 2.7 2.8 1.3;
4.5 3.8 2.4 1.7;
4.7 4.2 3.5 2.8;
3.6 3.3 2.7 1.2;
3.1 3.9 3.5 2.1;
4.5 3.4 2.8 2.5;
3.0 4.3 3.2 1.5;
];
%low iq without break
productivity_scores_li_nb = [
3.5 2.9 3.2 4.0;
3.2 1.7 3.3 3.8;
3.4 2.8 4.0 3.1;
4.6 3.1 3.4 3.7;
4.0 2.6 3.5 3.2;
3.6 1.7 3.4 3.4;
3.9 2.4 3.6 3.7;
4.3 3.0 3.6 3.3;
3.9 2.8 3.3 3.3;
3.5 1.7 3.3 3.4;
];
%high iq without break
productivity_scores_hi_nb = [
3.7 2.0 3.1 4.1;
3.9 2.6 2.8 3.2;
4.0 3.1 2.9 3.6;
4.0 1.8 3.1 4.1;
4.4 2.0 3.1 4.0;
4.0 2.0 3.8 3.2;
3.6 2.9 3.7 3.4;
3.8 2.0 2.7 3.3;
4.8 2.9 3.5 2.8;
3.8 2.7 3.3 3.6;
];
%Reshape data into a single column vector
scores = [productivity_scores_li_yb(:); productivity_scores_hi_yb(:);
productivity_scores_li_nb(:); productivity_scores_hi_nb(:)];
%Create factor vectors as string arrays
n = 10; % number of participants in each group
methods = 4; % number of learning methods
iq = [repmat({‘Low’}, n*methods*2, 1); repmat({‘High’}, n*methods*2, 1)]
break_status = [repmat({‘Yes’}, n*methods*2, 1); repmat({‘No’}, n*methods*2, 1)]
method = repmat({‘A’; ‘B’; ‘C’; ‘Alt’}, n*4, 1)
%Perform three-way ANOVA
[p, tbl, stats] = anovan(scores, {iq break_status method}, ‘model’, ‘full’, …
‘varnames’, {‘IQ’, ‘Break’, ‘Method’}, ‘display’, ‘on’);%the 4 numbers in each row correspond to the methods ‘A’; ‘B’; ‘C’ and ‘Alt’
%low iq with break
productivity_scores_li_yb = [
4.4 3.4 2.4 3.9;
4.1 3.8 1.8 2.7;
3.8 4.3 1.7 2.1;
4.4 4.4 1.9 2.6;
4.7 3.6 2.5 2.4;
3.3 3.9 2.0 3.2;
3.8 3.9 2.3 2.5;
4.3 2.8 2.5 3.5;
4.9 3.3 2.3 3.6;
3.8 4.0 1.8 2.9;
];
%high iq with break
productivity_scores_hi_yb = [
3.5 4.2 3.7 2.2;
3.7 4.2 2.4 1.4;
4.9 4.2 2.8 1.8;
3.5 2.7 2.8 1.3;
4.5 3.8 2.4 1.7;
4.7 4.2 3.5 2.8;
3.6 3.3 2.7 1.2;
3.1 3.9 3.5 2.1;
4.5 3.4 2.8 2.5;
3.0 4.3 3.2 1.5;
];
%low iq without break
productivity_scores_li_nb = [
3.5 2.9 3.2 4.0;
3.2 1.7 3.3 3.8;
3.4 2.8 4.0 3.1;
4.6 3.1 3.4 3.7;
4.0 2.6 3.5 3.2;
3.6 1.7 3.4 3.4;
3.9 2.4 3.6 3.7;
4.3 3.0 3.6 3.3;
3.9 2.8 3.3 3.3;
3.5 1.7 3.3 3.4;
];
%high iq without break
productivity_scores_hi_nb = [
3.7 2.0 3.1 4.1;
3.9 2.6 2.8 3.2;
4.0 3.1 2.9 3.6;
4.0 1.8 3.1 4.1;
4.4 2.0 3.1 4.0;
4.0 2.0 3.8 3.2;
3.6 2.9 3.7 3.4;
3.8 2.0 2.7 3.3;
4.8 2.9 3.5 2.8;
3.8 2.7 3.3 3.6;
];
%Reshape data into a single column vector
scores = [productivity_scores_li_yb(:); productivity_scores_hi_yb(:);
productivity_scores_li_nb(:); productivity_scores_hi_nb(:)];
%Create factor vectors as string arrays
n = 10; % number of participants in each group
methods = 4; % number of learning methods
iq = [repmat({‘Low’}, n*methods*2, 1); repmat({‘High’}, n*methods*2, 1)]
break_status = [repmat({‘Yes’}, n*methods*2, 1); repmat({‘No’}, n*methods*2, 1)]
method = repmat({‘A’; ‘B’; ‘C’; ‘Alt’}, n*4, 1)
%Perform three-way ANOVA
[p, tbl, stats] = anovan(scores, {iq break_status method}, ‘model’, ‘full’, …
‘varnames’, {‘IQ’, ‘Break’, ‘Method’}, ‘display’, ‘on’); %the 4 numbers in each row correspond to the methods ‘A’; ‘B’; ‘C’ and ‘Alt’
%low iq with break
productivity_scores_li_yb = [
4.4 3.4 2.4 3.9;
4.1 3.8 1.8 2.7;
3.8 4.3 1.7 2.1;
4.4 4.4 1.9 2.6;
4.7 3.6 2.5 2.4;
3.3 3.9 2.0 3.2;
3.8 3.9 2.3 2.5;
4.3 2.8 2.5 3.5;
4.9 3.3 2.3 3.6;
3.8 4.0 1.8 2.9;
];
%high iq with break
productivity_scores_hi_yb = [
3.5 4.2 3.7 2.2;
3.7 4.2 2.4 1.4;
4.9 4.2 2.8 1.8;
3.5 2.7 2.8 1.3;
4.5 3.8 2.4 1.7;
4.7 4.2 3.5 2.8;
3.6 3.3 2.7 1.2;
3.1 3.9 3.5 2.1;
4.5 3.4 2.8 2.5;
3.0 4.3 3.2 1.5;
];
%low iq without break
productivity_scores_li_nb = [
3.5 2.9 3.2 4.0;
3.2 1.7 3.3 3.8;
3.4 2.8 4.0 3.1;
4.6 3.1 3.4 3.7;
4.0 2.6 3.5 3.2;
3.6 1.7 3.4 3.4;
3.9 2.4 3.6 3.7;
4.3 3.0 3.6 3.3;
3.9 2.8 3.3 3.3;
3.5 1.7 3.3 3.4;
];
%high iq without break
productivity_scores_hi_nb = [
3.7 2.0 3.1 4.1;
3.9 2.6 2.8 3.2;
4.0 3.1 2.9 3.6;
4.0 1.8 3.1 4.1;
4.4 2.0 3.1 4.0;
4.0 2.0 3.8 3.2;
3.6 2.9 3.7 3.4;
3.8 2.0 2.7 3.3;
4.8 2.9 3.5 2.8;
3.8 2.7 3.3 3.6;
];
%Reshape data into a single column vector
scores = [productivity_scores_li_yb(:); productivity_scores_hi_yb(:);
productivity_scores_li_nb(:); productivity_scores_hi_nb(:)];
%Create factor vectors as string arrays
n = 10; % number of participants in each group
methods = 4; % number of learning methods
iq = [repmat({‘Low’}, n*methods*2, 1); repmat({‘High’}, n*methods*2, 1)]
break_status = [repmat({‘Yes’}, n*methods*2, 1); repmat({‘No’}, n*methods*2, 1)]
method = repmat({‘A’; ‘B’; ‘C’; ‘Alt’}, n*4, 1)
%Perform three-way ANOVA
[p, tbl, stats] = anovan(scores, {iq break_status method}, ‘model’, ‘full’, …
‘varnames’, {‘IQ’, ‘Break’, ‘Method’}, ‘display’, ‘on’); anova MATLAB Answers — New Questions
GPU Coder Error with OpenCV
I’m trying to use the example "Semantic Segmentation on NVIDIA DRIVE" just modifying it to be executing on a Jetson Nano board. I train my own network, then Ijust load my network instead of the one defined on the example, nevertheless when I try to deploy it to the Nano I have the following error:
/main.cu:10:10: fatal error: opencv2/opencv.hpp: No such file or directory
#include "opencv2/opencv.hpp"
I check on the nano to see if the installation of OpenCV is correct:
alvaro@alvaro-nano:~$ pkg-config –modversion opencv
2.4.9
The installation is correct, also when I call the code generation I pass the path as an -I command:
codegen -config cfg autoSemanticSegmentation -args {img} -I /usr/include/opencv4 -report -v
And I saw that this is inluded on the generated make file.
How can I fix this issue to be able to compile and execute the example on the Nano?I’m trying to use the example "Semantic Segmentation on NVIDIA DRIVE" just modifying it to be executing on a Jetson Nano board. I train my own network, then Ijust load my network instead of the one defined on the example, nevertheless when I try to deploy it to the Nano I have the following error:
/main.cu:10:10: fatal error: opencv2/opencv.hpp: No such file or directory
#include "opencv2/opencv.hpp"
I check on the nano to see if the installation of OpenCV is correct:
alvaro@alvaro-nano:~$ pkg-config –modversion opencv
2.4.9
The installation is correct, also when I call the code generation I pass the path as an -I command:
codegen -config cfg autoSemanticSegmentation -args {img} -I /usr/include/opencv4 -report -v
And I saw that this is inluded on the generated make file.
How can I fix this issue to be able to compile and execute the example on the Nano? I’m trying to use the example "Semantic Segmentation on NVIDIA DRIVE" just modifying it to be executing on a Jetson Nano board. I train my own network, then Ijust load my network instead of the one defined on the example, nevertheless when I try to deploy it to the Nano I have the following error:
/main.cu:10:10: fatal error: opencv2/opencv.hpp: No such file or directory
#include "opencv2/opencv.hpp"
I check on the nano to see if the installation of OpenCV is correct:
alvaro@alvaro-nano:~$ pkg-config –modversion opencv
2.4.9
The installation is correct, also when I call the code generation I pass the path as an -I command:
codegen -config cfg autoSemanticSegmentation -args {img} -I /usr/include/opencv4 -report -v
And I saw that this is inluded on the generated make file.
How can I fix this issue to be able to compile and execute the example on the Nano? gpu coder, opencv error MATLAB Answers — New Questions
heat and mass transfer problem nonlinear differential equations
The code is running, the graph is also came. But it does not give the convergence for the curves , , , and .
fluid_Sol_bvp4c2
function fluid_Sol_bvp4c2
Pr = 10;
Le = 10;
Nr = 0.5;
Nb = 0.5;
Nt = 0.5;
% Defining parameters
solinit = bvpinit(linspace(0, 10, 100), [0 0 1 1 0 1 0]);
sol = bvp4c(@bvp2D, @bc2D, solinit);
x = sol.x;
y = sol.y
% Plotting of the functions
figure(1)
plot(x, y(1,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘s(eta)’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Plotting of the velocity
figure(2)
plot(x, y(2,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘s^{prime}(eta)’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Plotting of theta
figure(3)
plot(x, y(4,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta ‘, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘theta ‘, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Plotting of the fun
figure(4)
plot(x, y(6,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘f(eta)’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Residual of the boundary conditions
function res = bc2D(y0, yinf)
res = [y0(1); % y1 to start at 0
y0(2); % y2 to start at 0
y0(4) – 1; % y4 to start at 1
y0(6) – 1; % y6 to start at 1
yinf(2) – 0; % desire y2 to converge to 0
yinf(4) – 0; % desire y4 to converge to 0
yinf(6) – 0]; % desire y5 to converge to 0
end
% System of First Order ODEs
function dydx = bvp2D(~, y)
yy1 = – 1/(4*Pr)*(3*y(1)*y(3) – 2*y(2)^2) – y(4) + Nr*y(6);
yy2 = – 3/4*y(1)*y(5) – Nb*y(7)*y(5) – Nt*y(5)^2;
yy3 = – 3/4*Le*y(7) – (Nt/Nb)*yy2;
dydx = [y(2); y(3); yy1; y(5); yy2; y(7); yy3];
end
end
I dont know whether i have to use extend code in bvp4c. Please help me do the needful. Thanks in advance.The code is running, the graph is also came. But it does not give the convergence for the curves , , , and .
fluid_Sol_bvp4c2
function fluid_Sol_bvp4c2
Pr = 10;
Le = 10;
Nr = 0.5;
Nb = 0.5;
Nt = 0.5;
% Defining parameters
solinit = bvpinit(linspace(0, 10, 100), [0 0 1 1 0 1 0]);
sol = bvp4c(@bvp2D, @bc2D, solinit);
x = sol.x;
y = sol.y
% Plotting of the functions
figure(1)
plot(x, y(1,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘s(eta)’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Plotting of the velocity
figure(2)
plot(x, y(2,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘s^{prime}(eta)’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Plotting of theta
figure(3)
plot(x, y(4,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta ‘, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘theta ‘, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Plotting of the fun
figure(4)
plot(x, y(6,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘f(eta)’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Residual of the boundary conditions
function res = bc2D(y0, yinf)
res = [y0(1); % y1 to start at 0
y0(2); % y2 to start at 0
y0(4) – 1; % y4 to start at 1
y0(6) – 1; % y6 to start at 1
yinf(2) – 0; % desire y2 to converge to 0
yinf(4) – 0; % desire y4 to converge to 0
yinf(6) – 0]; % desire y5 to converge to 0
end
% System of First Order ODEs
function dydx = bvp2D(~, y)
yy1 = – 1/(4*Pr)*(3*y(1)*y(3) – 2*y(2)^2) – y(4) + Nr*y(6);
yy2 = – 3/4*y(1)*y(5) – Nb*y(7)*y(5) – Nt*y(5)^2;
yy3 = – 3/4*Le*y(7) – (Nt/Nb)*yy2;
dydx = [y(2); y(3); yy1; y(5); yy2; y(7); yy3];
end
end
I dont know whether i have to use extend code in bvp4c. Please help me do the needful. Thanks in advance. The code is running, the graph is also came. But it does not give the convergence for the curves , , , and .
fluid_Sol_bvp4c2
function fluid_Sol_bvp4c2
Pr = 10;
Le = 10;
Nr = 0.5;
Nb = 0.5;
Nt = 0.5;
% Defining parameters
solinit = bvpinit(linspace(0, 10, 100), [0 0 1 1 0 1 0]);
sol = bvp4c(@bvp2D, @bc2D, solinit);
x = sol.x;
y = sol.y
% Plotting of the functions
figure(1)
plot(x, y(1,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘s(eta)’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Plotting of the velocity
figure(2)
plot(x, y(2,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘s^{prime}(eta)’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Plotting of theta
figure(3)
plot(x, y(4,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta ‘, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘theta ‘, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Plotting of the fun
figure(4)
plot(x, y(6,:), ‘linewidth’, 1), grid
hold on
xlabel(‘eta’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
ylabel(‘f(eta)’, ‘fontweight’, ‘bold’, ‘fontsize’, 16)
hold off
% Residual of the boundary conditions
function res = bc2D(y0, yinf)
res = [y0(1); % y1 to start at 0
y0(2); % y2 to start at 0
y0(4) – 1; % y4 to start at 1
y0(6) – 1; % y6 to start at 1
yinf(2) – 0; % desire y2 to converge to 0
yinf(4) – 0; % desire y4 to converge to 0
yinf(6) – 0]; % desire y5 to converge to 0
end
% System of First Order ODEs
function dydx = bvp2D(~, y)
yy1 = – 1/(4*Pr)*(3*y(1)*y(3) – 2*y(2)^2) – y(4) + Nr*y(6);
yy2 = – 3/4*y(1)*y(5) – Nb*y(7)*y(5) – Nt*y(5)^2;
yy3 = – 3/4*Le*y(7) – (Nt/Nb)*yy2;
dydx = [y(2); y(3); yy1; y(5); yy2; y(7); yy3];
end
end
I dont know whether i have to use extend code in bvp4c. Please help me do the needful. Thanks in advance. bvp4c method MATLAB Answers — New Questions
Custom Deep Learning Network for Xilinx FPGA target
I am researching on building deep learning accelerators on Xilinx FPGA using the Deep Learning HDL Toolbox. I have a custom CNN network that has an input layer size of [1 1024 2]. Using the ProcessorConfig Class, I’m trying to optimize the processor configuration for my custom CNN network with the optimizeConfigurationForNetwork helper.
The optimize processor is generated sucessfully, but while trying to estimate performance of the CNN network i get the following error:
The Conv module in the processor configuration has an InputMemorySize of [150 150 7]. This is insufficient to delploy the ‘AP1’ Layer. Increase the InputMemorySize to [171 171 7] or more using hPC.setModuleProperty(‘conv’, ‘InputMemorySize’, [171 171 7]), where hPC is the dlhdl.ProcessorConfig object.
I’ve tried to increase the InputMemorySize, but the error keeps being thrown with a higher inputMemorySize requirement for the 2D Average Pooling layer.
I’d appreciate you recommendation on how i could fix this. Thank you.
Paul Osinowo,
Graduate Student
University of Strathclyde, Glasgow.I am researching on building deep learning accelerators on Xilinx FPGA using the Deep Learning HDL Toolbox. I have a custom CNN network that has an input layer size of [1 1024 2]. Using the ProcessorConfig Class, I’m trying to optimize the processor configuration for my custom CNN network with the optimizeConfigurationForNetwork helper.
The optimize processor is generated sucessfully, but while trying to estimate performance of the CNN network i get the following error:
The Conv module in the processor configuration has an InputMemorySize of [150 150 7]. This is insufficient to delploy the ‘AP1’ Layer. Increase the InputMemorySize to [171 171 7] or more using hPC.setModuleProperty(‘conv’, ‘InputMemorySize’, [171 171 7]), where hPC is the dlhdl.ProcessorConfig object.
I’ve tried to increase the InputMemorySize, but the error keeps being thrown with a higher inputMemorySize requirement for the 2D Average Pooling layer.
I’d appreciate you recommendation on how i could fix this. Thank you.
Paul Osinowo,
Graduate Student
University of Strathclyde, Glasgow. I am researching on building deep learning accelerators on Xilinx FPGA using the Deep Learning HDL Toolbox. I have a custom CNN network that has an input layer size of [1 1024 2]. Using the ProcessorConfig Class, I’m trying to optimize the processor configuration for my custom CNN network with the optimizeConfigurationForNetwork helper.
The optimize processor is generated sucessfully, but while trying to estimate performance of the CNN network i get the following error:
The Conv module in the processor configuration has an InputMemorySize of [150 150 7]. This is insufficient to delploy the ‘AP1’ Layer. Increase the InputMemorySize to [171 171 7] or more using hPC.setModuleProperty(‘conv’, ‘InputMemorySize’, [171 171 7]), where hPC is the dlhdl.ProcessorConfig object.
I’ve tried to increase the InputMemorySize, but the error keeps being thrown with a higher inputMemorySize requirement for the 2D Average Pooling layer.
I’d appreciate you recommendation on how i could fix this. Thank you.
Paul Osinowo,
Graduate Student
University of Strathclyde, Glasgow. deep learning, deep learning hdl toolbox, hardware acceleration MATLAB Answers — New Questions
Can I submit to a MATLAB Parallel Server cluster that is running a different version than my MATLAB and Parallel Computing Toolbox setup?
I have a MATLAB Parallel Server cluster that is either newer or older than the version of MATLAB I have installed on my client machine. Can I still utilize this MATLAB version to submit jobs to my MATLAB Parallel Server setup?I have a MATLAB Parallel Server cluster that is either newer or older than the version of MATLAB I have installed on my client machine. Can I still utilize this MATLAB version to submit jobs to my MATLAB Parallel Server setup? I have a MATLAB Parallel Server cluster that is either newer or older than the version of MATLAB I have installed on my client machine. Can I still utilize this MATLAB version to submit jobs to my MATLAB Parallel Server setup? MATLAB Answers — New Questions
How to skip a part of y axis in plotting ode code?
I want to plot the solution for the following ode but one variable is far from other variable solutions. so If I was advised to skip a part of y axis to look presentable. I want to skip from 1.5*10^9 to 1.3*10^10 in the y-axis. Is that possible?
clc;
clear;
% Define initial conditions
S0 = 1; S_R0 = 0; C0 = 0; C_R0 = 0; M10 = 85000; M20 = 15000; T_H10 = 71000; T_H20 = 12000; T_C0 = 56000; T_REG0 = 8000; IL100 = 0.0085; IFNG0 = 0.12; IL20 = 0.0094;
y0 = [S0, S_R0, C0, C_R0, M10, M20, T_H10, T_H20, T_C0, T_REG0, IL100, IFNG0, IL20];
% Define time span
tspan = [0 8000];
% Solve the system using ode23
[t, y] = ode45(@odes, tspan, y0);
% Plot the results
figure
plot(t, y(:,1), t, y(:,2),t, y(:,3),t, y(:,4),t, y(:,5),t, y(:,6),t, y(:,7),t, y(:,8),t, y(:,9),t, y(:,10),”)
legend({‘S’, ‘S_R’, ‘C’, ‘C_R’, ‘M1’, ‘M2’, ‘T_{H1}’, ‘T_H2’, ‘T_C’, ‘T_{REG}’});
xlabel(‘Time(days)’)
xlim([0 800])
ylabel(‘Cell Density(cells/ml)’)
%title([‘Solution of ODE System’])
grid on
figure
plot(t, y(:,11), t, y(:,12),t, y(:,13))
legend({‘IL10’, ‘IFNG’, ‘IL2’});
xlabel(‘Time(days)’)
xlim([200 800])
ylabel(‘Variables’)
% title(‘Solution of ODE System’)
grid onI want to plot the solution for the following ode but one variable is far from other variable solutions. so If I was advised to skip a part of y axis to look presentable. I want to skip from 1.5*10^9 to 1.3*10^10 in the y-axis. Is that possible?
clc;
clear;
% Define initial conditions
S0 = 1; S_R0 = 0; C0 = 0; C_R0 = 0; M10 = 85000; M20 = 15000; T_H10 = 71000; T_H20 = 12000; T_C0 = 56000; T_REG0 = 8000; IL100 = 0.0085; IFNG0 = 0.12; IL20 = 0.0094;
y0 = [S0, S_R0, C0, C_R0, M10, M20, T_H10, T_H20, T_C0, T_REG0, IL100, IFNG0, IL20];
% Define time span
tspan = [0 8000];
% Solve the system using ode23
[t, y] = ode45(@odes, tspan, y0);
% Plot the results
figure
plot(t, y(:,1), t, y(:,2),t, y(:,3),t, y(:,4),t, y(:,5),t, y(:,6),t, y(:,7),t, y(:,8),t, y(:,9),t, y(:,10),”)
legend({‘S’, ‘S_R’, ‘C’, ‘C_R’, ‘M1’, ‘M2’, ‘T_{H1}’, ‘T_H2’, ‘T_C’, ‘T_{REG}’});
xlabel(‘Time(days)’)
xlim([0 800])
ylabel(‘Cell Density(cells/ml)’)
%title([‘Solution of ODE System’])
grid on
figure
plot(t, y(:,11), t, y(:,12),t, y(:,13))
legend({‘IL10’, ‘IFNG’, ‘IL2’});
xlabel(‘Time(days)’)
xlim([200 800])
ylabel(‘Variables’)
% title(‘Solution of ODE System’)
grid on I want to plot the solution for the following ode but one variable is far from other variable solutions. so If I was advised to skip a part of y axis to look presentable. I want to skip from 1.5*10^9 to 1.3*10^10 in the y-axis. Is that possible?
clc;
clear;
% Define initial conditions
S0 = 1; S_R0 = 0; C0 = 0; C_R0 = 0; M10 = 85000; M20 = 15000; T_H10 = 71000; T_H20 = 12000; T_C0 = 56000; T_REG0 = 8000; IL100 = 0.0085; IFNG0 = 0.12; IL20 = 0.0094;
y0 = [S0, S_R0, C0, C_R0, M10, M20, T_H10, T_H20, T_C0, T_REG0, IL100, IFNG0, IL20];
% Define time span
tspan = [0 8000];
% Solve the system using ode23
[t, y] = ode45(@odes, tspan, y0);
% Plot the results
figure
plot(t, y(:,1), t, y(:,2),t, y(:,3),t, y(:,4),t, y(:,5),t, y(:,6),t, y(:,7),t, y(:,8),t, y(:,9),t, y(:,10),”)
legend({‘S’, ‘S_R’, ‘C’, ‘C_R’, ‘M1’, ‘M2’, ‘T_{H1}’, ‘T_H2’, ‘T_C’, ‘T_{REG}’});
xlabel(‘Time(days)’)
xlim([0 800])
ylabel(‘Cell Density(cells/ml)’)
%title([‘Solution of ODE System’])
grid on
figure
plot(t, y(:,11), t, y(:,12),t, y(:,13))
legend({‘IL10’, ‘IFNG’, ‘IL2’});
xlabel(‘Time(days)’)
xlim([200 800])
ylabel(‘Variables’)
% title(‘Solution of ODE System’)
grid on breakyaxis, breakplot, edit MATLAB Answers — New Questions
HDL and NI FPGA code generation error.
Hello,
I am attempting to generate spike voltage using a MATLAB Function block in Simulink. While the function block successfully generates the spikes, I am encountering difficulties in generating HDL code from the Simulink MATLAB Function block.
I have attached the Simulink model and the error details. Could someone assist me in resolving this issue?
The sampling rate is 1e6.
The solver selection is fixed and discrete.Hello,
I am attempting to generate spike voltage using a MATLAB Function block in Simulink. While the function block successfully generates the spikes, I am encountering difficulties in generating HDL code from the Simulink MATLAB Function block.
I have attached the Simulink model and the error details. Could someone assist me in resolving this issue?
The sampling rate is 1e6.
The solver selection is fixed and discrete. Hello,
I am attempting to generate spike voltage using a MATLAB Function block in Simulink. While the function block successfully generates the spikes, I am encountering difficulties in generating HDL code from the Simulink MATLAB Function block.
I have attached the Simulink model and the error details. Could someone assist me in resolving this issue?
The sampling rate is 1e6.
The solver selection is fixed and discrete. hdl, matlab function MATLAB Answers — New Questions
Why does MATLAB Parallel Server validation fail or stall at the SPMD/Pool job test stage (communicating batch jobs)?
Why does MATLAB Parallel Server validation fail or stall at the SPMD/Pool job test stage (communicating batch jobs)?Why does MATLAB Parallel Server validation fail or stall at the SPMD/Pool job test stage (communicating batch jobs)? Why does MATLAB Parallel Server validation fail or stall at the SPMD/Pool job test stage (communicating batch jobs)? MATLAB Answers — New Questions
Photovoltaic Thermal (PV/T) Hybrid Solar Panel
In the mentioned model of the H/PVT system in R2020b, can anyone help me that how the pump controls the flow of water?In the mentioned model of the H/PVT system in R2020b, can anyone help me that how the pump controls the flow of water? In the mentioned model of the H/PVT system in R2020b, can anyone help me that how the pump controls the flow of water? photovoltaic thermal (pv/t) hybrid solar panel MATLAB Answers — New Questions
Trouble with inheritance i MATLAB OOP
I have two classes. ParameterFile and PathParameterFile. Both are used to read from an xml file and get its contents. PathParameterFile is a child class of ParameterFile. In PathParameterFile constructor, you pass in a path of the xmlfile, it reads out the xmlfile and stores it in a struct. This one has 2 Properties.
properties
Path;
xmlStruct;
end
And the constructor is like this
function obj = PathParameterFile(path)
obj.xmlStruct = readstruct(path);
end
Then there is a second function called extractdata that extracts individual data from the struct and stores it in seperate properties. Here in this xml file we only have one value, that is the path to a different xml file.
function extractData(obj)
obj.Path = obj.xmlStruct.Path;
end
This is the PathParameterFile class which is also the child class.
Now the Parent Class which is ParameterFile is similar, but it has more Properties and methods to return the properties. These are the properties
properties
Path;
MaximumVoltage;
MinimumVoltage;
AllowedDeviation;
xmlStruct;
end
And this is constructor and extractData function.
function obj = ParameterFile(path)
%xmlFile = ‘X:5000 R&DBM57V311_FAT_DataAnalysisFAT UpgradeFat_Upgrade.xml’;
obj.xmlStruct = readstruct(path);
end
function extractData(obj)
batteryType = ‘battery1’;
obj.Path = obj.xmlStruct.(batteryType).Path;
end
Now as i said there are functions to return the properties. That is here I get to return the Path. So I have a function like this.
function outputPath = getPath(obj)
outputPath = obj.Path;
end
This is my idea. So I enter the path in the command window and store it in path1 and use that path to create an object of PathParameterFile, like this
pm1 = PathParameterFile(path1);
Then I use the function getPath to retrieve the path in xml file and store it in path2.
path2 = pm1.getPath;
And use path2 to create an object of ParameterFile and then get all the values there. So getPath is only writtern in Parent Class, its not written in Child Class. I just plan to call it using the child Class . This is the total idea. But my proplem is when I create an object of PathParameterFile i.e
pm1 = PathParameterFile(path1)
, its giving an error
Cannot define property ‘Path’ in class
‘PathParameterFile’ because the property has already
been defined in the superclass ‘ParameterFile’.
So what is the problem here. I need to use Path in both child and parent class, so that I can write the getPath function only in ParentClass and call it using the child class. Is that not possible. What needs to be done. Thank you.I have two classes. ParameterFile and PathParameterFile. Both are used to read from an xml file and get its contents. PathParameterFile is a child class of ParameterFile. In PathParameterFile constructor, you pass in a path of the xmlfile, it reads out the xmlfile and stores it in a struct. This one has 2 Properties.
properties
Path;
xmlStruct;
end
And the constructor is like this
function obj = PathParameterFile(path)
obj.xmlStruct = readstruct(path);
end
Then there is a second function called extractdata that extracts individual data from the struct and stores it in seperate properties. Here in this xml file we only have one value, that is the path to a different xml file.
function extractData(obj)
obj.Path = obj.xmlStruct.Path;
end
This is the PathParameterFile class which is also the child class.
Now the Parent Class which is ParameterFile is similar, but it has more Properties and methods to return the properties. These are the properties
properties
Path;
MaximumVoltage;
MinimumVoltage;
AllowedDeviation;
xmlStruct;
end
And this is constructor and extractData function.
function obj = ParameterFile(path)
%xmlFile = ‘X:5000 R&DBM57V311_FAT_DataAnalysisFAT UpgradeFat_Upgrade.xml’;
obj.xmlStruct = readstruct(path);
end
function extractData(obj)
batteryType = ‘battery1’;
obj.Path = obj.xmlStruct.(batteryType).Path;
end
Now as i said there are functions to return the properties. That is here I get to return the Path. So I have a function like this.
function outputPath = getPath(obj)
outputPath = obj.Path;
end
This is my idea. So I enter the path in the command window and store it in path1 and use that path to create an object of PathParameterFile, like this
pm1 = PathParameterFile(path1);
Then I use the function getPath to retrieve the path in xml file and store it in path2.
path2 = pm1.getPath;
And use path2 to create an object of ParameterFile and then get all the values there. So getPath is only writtern in Parent Class, its not written in Child Class. I just plan to call it using the child Class . This is the total idea. But my proplem is when I create an object of PathParameterFile i.e
pm1 = PathParameterFile(path1)
, its giving an error
Cannot define property ‘Path’ in class
‘PathParameterFile’ because the property has already
been defined in the superclass ‘ParameterFile’.
So what is the problem here. I need to use Path in both child and parent class, so that I can write the getPath function only in ParentClass and call it using the child class. Is that not possible. What needs to be done. Thank you. I have two classes. ParameterFile and PathParameterFile. Both are used to read from an xml file and get its contents. PathParameterFile is a child class of ParameterFile. In PathParameterFile constructor, you pass in a path of the xmlfile, it reads out the xmlfile and stores it in a struct. This one has 2 Properties.
properties
Path;
xmlStruct;
end
And the constructor is like this
function obj = PathParameterFile(path)
obj.xmlStruct = readstruct(path);
end
Then there is a second function called extractdata that extracts individual data from the struct and stores it in seperate properties. Here in this xml file we only have one value, that is the path to a different xml file.
function extractData(obj)
obj.Path = obj.xmlStruct.Path;
end
This is the PathParameterFile class which is also the child class.
Now the Parent Class which is ParameterFile is similar, but it has more Properties and methods to return the properties. These are the properties
properties
Path;
MaximumVoltage;
MinimumVoltage;
AllowedDeviation;
xmlStruct;
end
And this is constructor and extractData function.
function obj = ParameterFile(path)
%xmlFile = ‘X:5000 R&DBM57V311_FAT_DataAnalysisFAT UpgradeFat_Upgrade.xml’;
obj.xmlStruct = readstruct(path);
end
function extractData(obj)
batteryType = ‘battery1’;
obj.Path = obj.xmlStruct.(batteryType).Path;
end
Now as i said there are functions to return the properties. That is here I get to return the Path. So I have a function like this.
function outputPath = getPath(obj)
outputPath = obj.Path;
end
This is my idea. So I enter the path in the command window and store it in path1 and use that path to create an object of PathParameterFile, like this
pm1 = PathParameterFile(path1);
Then I use the function getPath to retrieve the path in xml file and store it in path2.
path2 = pm1.getPath;
And use path2 to create an object of ParameterFile and then get all the values there. So getPath is only writtern in Parent Class, its not written in Child Class. I just plan to call it using the child Class . This is the total idea. But my proplem is when I create an object of PathParameterFile i.e
pm1 = PathParameterFile(path1)
, its giving an error
Cannot define property ‘Path’ in class
‘PathParameterFile’ because the property has already
been defined in the superclass ‘ParameterFile’.
So what is the problem here. I need to use Path in both child and parent class, so that I can write the getPath function only in ParentClass and call it using the child class. Is that not possible. What needs to be done. Thank you. matlab, oop, inheritance MATLAB Answers — New Questions
Python can’t send value to simulink constant block
This is my simulink. I want to send the value from my python to constant block of u1 and u2, then the x1 and x2 will send the output to my python. Please ignore u2, cuz still in testing phase.
this is part of my python code, the set control action is used to send the value to u1 and u2 in simulink. This is the issue where the simulink cant access to the value sent from python. The output dont have issue.
Here is the output, as shown above the output x1 is showing 1.0 which shows that the constant block is not deliver the input values from python.
SO is there anyway to solve this issue? anything i need to check or set in the simulink? or any website or code I can refer to? any help or recommendation will be appreaciate. Thank you very much.This is my simulink. I want to send the value from my python to constant block of u1 and u2, then the x1 and x2 will send the output to my python. Please ignore u2, cuz still in testing phase.
this is part of my python code, the set control action is used to send the value to u1 and u2 in simulink. This is the issue where the simulink cant access to the value sent from python. The output dont have issue.
Here is the output, as shown above the output x1 is showing 1.0 which shows that the constant block is not deliver the input values from python.
SO is there anyway to solve this issue? anything i need to check or set in the simulink? or any website or code I can refer to? any help or recommendation will be appreaciate. Thank you very much. This is my simulink. I want to send the value from my python to constant block of u1 and u2, then the x1 and x2 will send the output to my python. Please ignore u2, cuz still in testing phase.
this is part of my python code, the set control action is used to send the value to u1 and u2 in simulink. This is the issue where the simulink cant access to the value sent from python. The output dont have issue.
Here is the output, as shown above the output x1 is showing 1.0 which shows that the constant block is not deliver the input values from python.
SO is there anyway to solve this issue? anything i need to check or set in the simulink? or any website or code I can refer to? any help or recommendation will be appreaciate. Thank you very much. simulink, python MATLAB Answers — New Questions
Resolve: “Dot indexing is not supported for variables of this type.”
Hi
I am using MATLAB online. I am getting the following error
Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. > In rawDataReader>initDisplayPage (line 714)
In rawDataReader (line 165)
Dot indexing is not supported for variables of this type.
Error in rawDataReader>initDisplayPage (line 716)
jframe.setFigureIcon(jIcon);
Error in rawDataReader (line 165)
ui.figHandle = initDisplayPage(setupJSON.mmWaveDevice);
Here is the code in line 165 of rawDataReader
ui.figHandle = initDisplayPage(setupJSON.mmWaveDevice);
"setupJSON" variable is created using below line
setupJSON = jsondecode(fileread(‘2024_July_07_setup.setup.json’));
Here is the content of file ‘2024_July_07_setup.setup.json’
{
"createdByVersion": "2.1.0",
"createdOn": "2024-07-07T11:52:19.6750601+05:30",
"configUsed": "./data_and_related_files/2024_July_07_mmWave.mmwave.json",
"captureHardware": "DCA1000",
"DCA1000Config": {
"dataLoggingMode": "raw",
"dataTransferMode": "LVDSCapture",
"dataCaptureMode": "ethernetStream",
"packetSequenceEnable": 1,
"packetDelay_us": 25
},
"mmWaveDevice": "awr1843",
"operatingFreq": 77,
"mmWaveDeviceConfig": {
"RS232COMPort": "COM9",
"RS232BaudRate": "921600",
"radarSSFirmware": "xwr18xx_radarss.bin",
"masterSSFirmware": "xwr18xx_masterss.bin"
},
"capturedFiles": {
"numFilesCollected": 1,
"fileBasePath": "./data_and_related_files",
"files": [
{
"rawFileName": "adc_data_Raw_0.bin",
"processedFileName": "2024_July_07_adc_data_256Samples_128Loops_1000Frames.bin",
"processedFileSummary": {
"numZeroFillBytes": 0
}
}
]
}
}
How to resolve this errorHi
I am using MATLAB online. I am getting the following error
Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. > In rawDataReader>initDisplayPage (line 714)
In rawDataReader (line 165)
Dot indexing is not supported for variables of this type.
Error in rawDataReader>initDisplayPage (line 716)
jframe.setFigureIcon(jIcon);
Error in rawDataReader (line 165)
ui.figHandle = initDisplayPage(setupJSON.mmWaveDevice);
Here is the code in line 165 of rawDataReader
ui.figHandle = initDisplayPage(setupJSON.mmWaveDevice);
"setupJSON" variable is created using below line
setupJSON = jsondecode(fileread(‘2024_July_07_setup.setup.json’));
Here is the content of file ‘2024_July_07_setup.setup.json’
{
"createdByVersion": "2.1.0",
"createdOn": "2024-07-07T11:52:19.6750601+05:30",
"configUsed": "./data_and_related_files/2024_July_07_mmWave.mmwave.json",
"captureHardware": "DCA1000",
"DCA1000Config": {
"dataLoggingMode": "raw",
"dataTransferMode": "LVDSCapture",
"dataCaptureMode": "ethernetStream",
"packetSequenceEnable": 1,
"packetDelay_us": 25
},
"mmWaveDevice": "awr1843",
"operatingFreq": 77,
"mmWaveDeviceConfig": {
"RS232COMPort": "COM9",
"RS232BaudRate": "921600",
"radarSSFirmware": "xwr18xx_radarss.bin",
"masterSSFirmware": "xwr18xx_masterss.bin"
},
"capturedFiles": {
"numFilesCollected": 1,
"fileBasePath": "./data_and_related_files",
"files": [
{
"rawFileName": "adc_data_Raw_0.bin",
"processedFileName": "2024_July_07_adc_data_256Samples_128Loops_1000Frames.bin",
"processedFileSummary": {
"numZeroFillBytes": 0
}
}
]
}
}
How to resolve this error Hi
I am using MATLAB online. I am getting the following error
Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. > In rawDataReader>initDisplayPage (line 714)
In rawDataReader (line 165)
Dot indexing is not supported for variables of this type.
Error in rawDataReader>initDisplayPage (line 716)
jframe.setFigureIcon(jIcon);
Error in rawDataReader (line 165)
ui.figHandle = initDisplayPage(setupJSON.mmWaveDevice);
Here is the code in line 165 of rawDataReader
ui.figHandle = initDisplayPage(setupJSON.mmWaveDevice);
"setupJSON" variable is created using below line
setupJSON = jsondecode(fileread(‘2024_July_07_setup.setup.json’));
Here is the content of file ‘2024_July_07_setup.setup.json’
{
"createdByVersion": "2.1.0",
"createdOn": "2024-07-07T11:52:19.6750601+05:30",
"configUsed": "./data_and_related_files/2024_July_07_mmWave.mmwave.json",
"captureHardware": "DCA1000",
"DCA1000Config": {
"dataLoggingMode": "raw",
"dataTransferMode": "LVDSCapture",
"dataCaptureMode": "ethernetStream",
"packetSequenceEnable": 1,
"packetDelay_us": 25
},
"mmWaveDevice": "awr1843",
"operatingFreq": 77,
"mmWaveDeviceConfig": {
"RS232COMPort": "COM9",
"RS232BaudRate": "921600",
"radarSSFirmware": "xwr18xx_radarss.bin",
"masterSSFirmware": "xwr18xx_masterss.bin"
},
"capturedFiles": {
"numFilesCollected": 1,
"fileBasePath": "./data_and_related_files",
"files": [
{
"rawFileName": "adc_data_Raw_0.bin",
"processedFileName": "2024_July_07_adc_data_256Samples_128Loops_1000Frames.bin",
"processedFileSummary": {
"numZeroFillBytes": 0
}
}
]
}
}
How to resolve this error dot indexing, matlab, matlab online, command line, error, resolve MATLAB Answers — New Questions
How to read lines from cell
this time I’m trying to process data from a .txt file.
my goal is to extrat the information at specific lines.
I load my file
temp3 = regexp(fileread(‘DT_Diagra_ScanTool_DT62234_T0410_SHAP_001.txt’), ‘r?n’, ‘split’)’;
I got a 680×1 cell
I made and index to find the line in whic is the value I wnat.
idc = strfind(temp3,’PID 01′);
idx = ~cellfun(‘isempty’,idc);
is there any way to get all the ‘0’ and ‘1’ in that row?
after that I will also need to get the next 4 lines below and end up getting below values
0000 0000
0000 0111
1110 0101
1110 0101
as always any feedback will be high appreciatedthis time I’m trying to process data from a .txt file.
my goal is to extrat the information at specific lines.
I load my file
temp3 = regexp(fileread(‘DT_Diagra_ScanTool_DT62234_T0410_SHAP_001.txt’), ‘r?n’, ‘split’)’;
I got a 680×1 cell
I made and index to find the line in whic is the value I wnat.
idc = strfind(temp3,’PID 01′);
idx = ~cellfun(‘isempty’,idc);
is there any way to get all the ‘0’ and ‘1’ in that row?
after that I will also need to get the next 4 lines below and end up getting below values
0000 0000
0000 0111
1110 0101
1110 0101
as always any feedback will be high appreciated this time I’m trying to process data from a .txt file.
my goal is to extrat the information at specific lines.
I load my file
temp3 = regexp(fileread(‘DT_Diagra_ScanTool_DT62234_T0410_SHAP_001.txt’), ‘r?n’, ‘split’)’;
I got a 680×1 cell
I made and index to find the line in whic is the value I wnat.
idc = strfind(temp3,’PID 01′);
idx = ~cellfun(‘isempty’,idc);
is there any way to get all the ‘0’ and ‘1’ in that row?
after that I will also need to get the next 4 lines below and end up getting below values
0000 0000
0000 0111
1110 0101
1110 0101
as always any feedback will be high appreciated matlab, txt, cell MATLAB Answers — New Questions
Pre R2019b: How can I test the licensing and installation for the worker nodes in my MATLAB Parallel Server cluster?
How can I test the licensing for the MATLAB workers on nodes in my MATLAB Parallel Server cluster?How can I test the licensing for the MATLAB workers on nodes in my MATLAB Parallel Server cluster? How can I test the licensing for the MATLAB workers on nodes in my MATLAB Parallel Server cluster? MATLAB Answers — New Questions
Why does validation fail on the ‘Cluster connection test’ when using the MATLAB Job Scheduler?
Why does validation fail on the "Cluster connection test" when I am using the MATLAB Job Scheduler?
Validation fails with the following error message:
ERROR: Could not contact an MJS lookup service on host ‘ah-hostname’. Possible reasons for this problem are:1. MJS has not been started, has crashed, or has been shut down.
2. A firewall is blocking communication between this computer and ‘ah-hostname’.
3. This computer cannot resolve the hostname of ‘ah-hostname’, it resolves it to an incorrect IP address.
4. ‘ah-hostname’ resolves its own hostname to an incorrect IP address.
5. Network routers are unable to route traffic from this computer to ‘ah-hostname’.
The hostname, ah-hostname, corresponds to the fully qualified hostname ah-hostname.dhcp.mathworks.com.
This computer resolves it to the IP address 111.22.33.44.Why does validation fail on the "Cluster connection test" when I am using the MATLAB Job Scheduler?
Validation fails with the following error message:
ERROR: Could not contact an MJS lookup service on host ‘ah-hostname’. Possible reasons for this problem are:1. MJS has not been started, has crashed, or has been shut down.
2. A firewall is blocking communication between this computer and ‘ah-hostname’.
3. This computer cannot resolve the hostname of ‘ah-hostname’, it resolves it to an incorrect IP address.
4. ‘ah-hostname’ resolves its own hostname to an incorrect IP address.
5. Network routers are unable to route traffic from this computer to ‘ah-hostname’.
The hostname, ah-hostname, corresponds to the fully qualified hostname ah-hostname.dhcp.mathworks.com.
This computer resolves it to the IP address 111.22.33.44. Why does validation fail on the "Cluster connection test" when I am using the MATLAB Job Scheduler?
Validation fails with the following error message:
ERROR: Could not contact an MJS lookup service on host ‘ah-hostname’. Possible reasons for this problem are:1. MJS has not been started, has crashed, or has been shut down.
2. A firewall is blocking communication between this computer and ‘ah-hostname’.
3. This computer cannot resolve the hostname of ‘ah-hostname’, it resolves it to an incorrect IP address.
4. ‘ah-hostname’ resolves its own hostname to an incorrect IP address.
5. Network routers are unable to route traffic from this computer to ‘ah-hostname’.
The hostname, ah-hostname, corresponds to the fully qualified hostname ah-hostname.dhcp.mathworks.com.
This computer resolves it to the IP address 111.22.33.44. MATLAB Answers — New Questions
Hi I have Csv file for voltage and time data and I would like to compute spectrogram to to compute harmonics at different frequencies but my spectrogram looks so much noisy or
%%
folder = ‘C:UsersMinDesktopNew folder (3)’;
filename = ’27o2.csv’;
data = readtable(fullfile(folder, filename));
t = table2array(data(3:end, 1));
x = table2array(data(3:end, 2));
fs = 1 / (t(2) – t(1));
% Plot the spectrogram
figure;
spectrogram(x, 500,100,500, fs, ‘yaxis’);
% Customize the plot
xlabel(‘Time (s)’);
ylabel(‘Frequency (MHz)’);
colormap("hot")
title(‘Spectrogram’);
colorbar;%%
folder = ‘C:UsersMinDesktopNew folder (3)’;
filename = ’27o2.csv’;
data = readtable(fullfile(folder, filename));
t = table2array(data(3:end, 1));
x = table2array(data(3:end, 2));
fs = 1 / (t(2) – t(1));
% Plot the spectrogram
figure;
spectrogram(x, 500,100,500, fs, ‘yaxis’);
% Customize the plot
xlabel(‘Time (s)’);
ylabel(‘Frequency (MHz)’);
colormap("hot")
title(‘Spectrogram’);
colorbar; %%
folder = ‘C:UsersMinDesktopNew folder (3)’;
filename = ’27o2.csv’;
data = readtable(fullfile(folder, filename));
t = table2array(data(3:end, 1));
x = table2array(data(3:end, 2));
fs = 1 / (t(2) – t(1));
% Plot the spectrogram
figure;
spectrogram(x, 500,100,500, fs, ‘yaxis’);
% Customize the plot
xlabel(‘Time (s)’);
ylabel(‘Frequency (MHz)’);
colormap("hot")
title(‘Spectrogram’);
colorbar; signal processing, spectrogram MATLAB Answers — New Questions
problem when running the simulink model connected with arduino mega2560
Below is the error that I faced. How to solve this.
Caused by:
Unable to create a communication link with the serial port. Please check the input argument PORT and verify that a device is connected.
Component:Simulink | Category:Block errorBelow is the error that I faced. How to solve this.
Caused by:
Unable to create a communication link with the serial port. Please check the input argument PORT and verify that a device is connected.
Component:Simulink | Category:Block error Below is the error that I faced. How to solve this.
Caused by:
Unable to create a communication link with the serial port. Please check the input argument PORT and verify that a device is connected.
Component:Simulink | Category:Block error arduino MATLAB Answers — New Questions