Category: News
dual solution for skin friction and nusselt number and sheerword number using bvp4c solver: mathematical equations and the code is given in description.
Artical:Unsteady boundary-layer flow and heat transfer of a nanofluid over a permeable stretching/shrinking sheet
here are the mathematical equations:
f^”’+A(ff^”-f^’2 )+f^’+η/2 f^”=0
1/Pr θ^”+(Af+η/2) θ^’+Nbθ^’ φ^’+Nt(θ^’ )^2=0
φ^”+Le(Af+η/2) φ^’+Nt/Nb θ^”=0
boundary conditions:
f(0)=s, f^’ (0)=λ, θ(0)=1,φ(0)=1
f^’ (η)→0,θ(η)→0,φ (η)→0 as η→inf
the code is :
Ibrardual()
function Ibrardual
clc
clear all
Nt=0.5; Nb=0.5; Le=2; Pr=1; alpha=1.5; s=1; A=3;
%% solution in structure form
%First solution
sol = bvpinit(linspace(0,6,10), [0 0 0 0 0 0 0]);
sol1 = bvp4c(@bvpexam2, @bcexam2, sol);
x1 = sol1.x;
y1 = sol1.y;
% Second solution
opts = bvpset(‘stats’,’off’,’RelTol’,1e-10);
sol = bvpinit(linspace(0,5,10), [-1 0 0 0 0 0 0]);
sol2 = bvp4c(@bvpexam2, @bcexam2_dual, sol,opts);
x2 = sol2.x;
y2 = sol2.y;
% Plot both solutions
plot(x1,y1(3,:),’-‘); hold on
plot(x2,y2(3,:),’–‘);
xlabel(‘eta’)
ylabel(‘f`(eta)’)
result1 = A^(-1/2)*y1(3,1)
result2 = A^(-1/2)*y2(3,1)
%%residual of bcs
function res = bcexam2(y0, yinf)
res= [y0(1)-s; y0(2)-alpha; y0(4)-1; y0(6)-1; yinf(2); yinf(4);yinf(6)];
end
function res = bcexam2_dual(y0, yinf)
res= [y0(1)-s; y0(2)-alpha; y0(4)-1; y0(6)-1; yinf(2); yinf(4);yinf(6)];
end
%% first order odes
function ysol = bvpexam2(x,y)
yy1 = -(A*y(1)*y(3)-A*(y(2))^2)-y(2)-(x/2)*y(3);
yy2 = -Pr*(A*y(1)*y(5)+(x/2)*y(5)+Nb*y(5)*y(7)+Nt*(y(5))^2);
yy3 = (-Le*(A*(y(1)*y(7)+(x/2)*y(7)))-(Nt/Nb)*( -Pr*(A*y(1)*y(5)+Nb*y(5)*y(7)+Nt*(y(5))^2)));
ysol = [y(2); y(3); yy1;y(5);yy2;y(7);yy3];
end
endArtical:Unsteady boundary-layer flow and heat transfer of a nanofluid over a permeable stretching/shrinking sheet
here are the mathematical equations:
f^”’+A(ff^”-f^’2 )+f^’+η/2 f^”=0
1/Pr θ^”+(Af+η/2) θ^’+Nbθ^’ φ^’+Nt(θ^’ )^2=0
φ^”+Le(Af+η/2) φ^’+Nt/Nb θ^”=0
boundary conditions:
f(0)=s, f^’ (0)=λ, θ(0)=1,φ(0)=1
f^’ (η)→0,θ(η)→0,φ (η)→0 as η→inf
the code is :
Ibrardual()
function Ibrardual
clc
clear all
Nt=0.5; Nb=0.5; Le=2; Pr=1; alpha=1.5; s=1; A=3;
%% solution in structure form
%First solution
sol = bvpinit(linspace(0,6,10), [0 0 0 0 0 0 0]);
sol1 = bvp4c(@bvpexam2, @bcexam2, sol);
x1 = sol1.x;
y1 = sol1.y;
% Second solution
opts = bvpset(‘stats’,’off’,’RelTol’,1e-10);
sol = bvpinit(linspace(0,5,10), [-1 0 0 0 0 0 0]);
sol2 = bvp4c(@bvpexam2, @bcexam2_dual, sol,opts);
x2 = sol2.x;
y2 = sol2.y;
% Plot both solutions
plot(x1,y1(3,:),’-‘); hold on
plot(x2,y2(3,:),’–‘);
xlabel(‘eta’)
ylabel(‘f`(eta)’)
result1 = A^(-1/2)*y1(3,1)
result2 = A^(-1/2)*y2(3,1)
%%residual of bcs
function res = bcexam2(y0, yinf)
res= [y0(1)-s; y0(2)-alpha; y0(4)-1; y0(6)-1; yinf(2); yinf(4);yinf(6)];
end
function res = bcexam2_dual(y0, yinf)
res= [y0(1)-s; y0(2)-alpha; y0(4)-1; y0(6)-1; yinf(2); yinf(4);yinf(6)];
end
%% first order odes
function ysol = bvpexam2(x,y)
yy1 = -(A*y(1)*y(3)-A*(y(2))^2)-y(2)-(x/2)*y(3);
yy2 = -Pr*(A*y(1)*y(5)+(x/2)*y(5)+Nb*y(5)*y(7)+Nt*(y(5))^2);
yy3 = (-Le*(A*(y(1)*y(7)+(x/2)*y(7)))-(Nt/Nb)*( -Pr*(A*y(1)*y(5)+Nb*y(5)*y(7)+Nt*(y(5))^2)));
ysol = [y(2); y(3); yy1;y(5);yy2;y(7);yy3];
end
end Artical:Unsteady boundary-layer flow and heat transfer of a nanofluid over a permeable stretching/shrinking sheet
here are the mathematical equations:
f^”’+A(ff^”-f^’2 )+f^’+η/2 f^”=0
1/Pr θ^”+(Af+η/2) θ^’+Nbθ^’ φ^’+Nt(θ^’ )^2=0
φ^”+Le(Af+η/2) φ^’+Nt/Nb θ^”=0
boundary conditions:
f(0)=s, f^’ (0)=λ, θ(0)=1,φ(0)=1
f^’ (η)→0,θ(η)→0,φ (η)→0 as η→inf
the code is :
Ibrardual()
function Ibrardual
clc
clear all
Nt=0.5; Nb=0.5; Le=2; Pr=1; alpha=1.5; s=1; A=3;
%% solution in structure form
%First solution
sol = bvpinit(linspace(0,6,10), [0 0 0 0 0 0 0]);
sol1 = bvp4c(@bvpexam2, @bcexam2, sol);
x1 = sol1.x;
y1 = sol1.y;
% Second solution
opts = bvpset(‘stats’,’off’,’RelTol’,1e-10);
sol = bvpinit(linspace(0,5,10), [-1 0 0 0 0 0 0]);
sol2 = bvp4c(@bvpexam2, @bcexam2_dual, sol,opts);
x2 = sol2.x;
y2 = sol2.y;
% Plot both solutions
plot(x1,y1(3,:),’-‘); hold on
plot(x2,y2(3,:),’–‘);
xlabel(‘eta’)
ylabel(‘f`(eta)’)
result1 = A^(-1/2)*y1(3,1)
result2 = A^(-1/2)*y2(3,1)
%%residual of bcs
function res = bcexam2(y0, yinf)
res= [y0(1)-s; y0(2)-alpha; y0(4)-1; y0(6)-1; yinf(2); yinf(4);yinf(6)];
end
function res = bcexam2_dual(y0, yinf)
res= [y0(1)-s; y0(2)-alpha; y0(4)-1; y0(6)-1; yinf(2); yinf(4);yinf(6)];
end
%% first order odes
function ysol = bvpexam2(x,y)
yy1 = -(A*y(1)*y(3)-A*(y(2))^2)-y(2)-(x/2)*y(3);
yy2 = -Pr*(A*y(1)*y(5)+(x/2)*y(5)+Nb*y(5)*y(7)+Nt*(y(5))^2);
yy3 = (-Le*(A*(y(1)*y(7)+(x/2)*y(7)))-(Nt/Nb)*( -Pr*(A*y(1)*y(5)+Nb*y(5)*y(7)+Nt*(y(5))^2)));
ysol = [y(2); y(3); yy1;y(5);yy2;y(7);yy3];
end
end matlab MATLAB Answers — New Questions
Is it possible to customize the automatically created webapp for chat?
Ive used AI studio to create an intelligent agent that answers questions on my content via the automatically created webapp (tutorial here)
Is it possible to customize this webapp, or use it as a base webpage and add additional features?
Ive used AI studio to create an intelligent agent that answers questions on my content via the automatically created webapp (tutorial here) Is it possible to customize this webapp, or use it as a base webpage and add additional features? Read More
Prevent Matlab from updating the legend when saving a figure
I have a figure with a tiled layout and some plots which – because they are partly related – I don’t want to give them all their own legend entry, but rather summarise several plots with one entry. I do this by subsequently changing the legend entries to display several line types, like in this example:
leg = legend([plot1, plot2], {‘Plot1’, ‘Plot2’});
drawnow();
% Update legend
hLegendEntryTop = leg.EntryContainer.NodeChildren(end); % top row of legend
iconSet = hLegendEntryTop.Icon.Transform.Children.Children; % array of icons
% Move primary line up
iconSet(1).VertexData(2,1) = 0.65;
iconSet(1).VertexData(2,2) = 0.65;
% Create a new line
iconSet(2) = copy(iconSet(1)); % copy the object
iconSet(2) = iconSet(1).Parent; % set the parent, adding to the legend’s icon draw set
% Move primary line down
iconSet(2).VertexData(2,1) = 0.35;
iconSet(2).VertexData(2,2) = 0.35;
iconSet(2).LineStyle = ‘dashed’;
…… % Do the same with other plot lines
saveas(gcf,’figure’,’epsc’)
Interestingly, it works when exporting as PNG, but not when exporting as eps or pdf (vector graphics). The image is then updated and all additional lines inserted disappear again. I have absolutely no idea how I can prevent Matlab from updating the legend again when saving.I have a figure with a tiled layout and some plots which – because they are partly related – I don’t want to give them all their own legend entry, but rather summarise several plots with one entry. I do this by subsequently changing the legend entries to display several line types, like in this example:
leg = legend([plot1, plot2], {‘Plot1’, ‘Plot2’});
drawnow();
% Update legend
hLegendEntryTop = leg.EntryContainer.NodeChildren(end); % top row of legend
iconSet = hLegendEntryTop.Icon.Transform.Children.Children; % array of icons
% Move primary line up
iconSet(1).VertexData(2,1) = 0.65;
iconSet(1).VertexData(2,2) = 0.65;
% Create a new line
iconSet(2) = copy(iconSet(1)); % copy the object
iconSet(2) = iconSet(1).Parent; % set the parent, adding to the legend’s icon draw set
% Move primary line down
iconSet(2).VertexData(2,1) = 0.35;
iconSet(2).VertexData(2,2) = 0.35;
iconSet(2).LineStyle = ‘dashed’;
…… % Do the same with other plot lines
saveas(gcf,’figure’,’epsc’)
Interestingly, it works when exporting as PNG, but not when exporting as eps or pdf (vector graphics). The image is then updated and all additional lines inserted disappear again. I have absolutely no idea how I can prevent Matlab from updating the legend again when saving. I have a figure with a tiled layout and some plots which – because they are partly related – I don’t want to give them all their own legend entry, but rather summarise several plots with one entry. I do this by subsequently changing the legend entries to display several line types, like in this example:
leg = legend([plot1, plot2], {‘Plot1’, ‘Plot2’});
drawnow();
% Update legend
hLegendEntryTop = leg.EntryContainer.NodeChildren(end); % top row of legend
iconSet = hLegendEntryTop.Icon.Transform.Children.Children; % array of icons
% Move primary line up
iconSet(1).VertexData(2,1) = 0.65;
iconSet(1).VertexData(2,2) = 0.65;
% Create a new line
iconSet(2) = copy(iconSet(1)); % copy the object
iconSet(2) = iconSet(1).Parent; % set the parent, adding to the legend’s icon draw set
% Move primary line down
iconSet(2).VertexData(2,1) = 0.35;
iconSet(2).VertexData(2,2) = 0.35;
iconSet(2).LineStyle = ‘dashed’;
…… % Do the same with other plot lines
saveas(gcf,’figure’,’epsc’)
Interestingly, it works when exporting as PNG, but not when exporting as eps or pdf (vector graphics). The image is then updated and all additional lines inserted disappear again. I have absolutely no idea how I can prevent Matlab from updating the legend again when saving. save, legend MATLAB Answers — New Questions
What is the autocorrelation of the Gaussian random noise sequence N = 20
What is the autocorrelation of the Gaussian random noise sequence N = 20What is the autocorrelation of the Gaussian random noise sequence N = 20 What is the autocorrelation of the Gaussian random noise sequence N = 20 dsp MATLAB Answers — New Questions
The Output structure of a code is showing different outputs in command window and workspace
When working on a program, after executing it and checking output in MATLAB command window and in output from workspace is giving different outputs. Which is correct output here and what is this happening?
Command window output:
Workspace output:When working on a program, after executing it and checking output in MATLAB command window and in output from workspace is giving different outputs. Which is correct output here and what is this happening?
Command window output:
Workspace output: When working on a program, after executing it and checking output in MATLAB command window and in output from workspace is giving different outputs. Which is correct output here and what is this happening?
Command window output:
Workspace output: output matlab MATLAB Answers — New Questions
The MCT Store has been retired.
Dear Experts,
I am the MCT since 2016. I would need to order some merchandise from the MCT Store. But I can see the MCT store is retired.
Can someone please help me to get the correct link or access to order my merchandise?
Regards
Rezwanur.
Dear Experts,
I am the MCT since 2016. I would need to order some merchandise from the MCT Store. But I can see the MCT store is retired.
https://aka.ms/mctstoreCan someone please help me to get the correct link or access to order my merchandise? Regards
Rezwanur. Read More
Unable to delete blank page in word
Unable to delete blank page in word on Mac OS
PS : pdf to .docx originally pdf
Unable to delete blank page in word on Mac OS PS : pdf to .docx originally pdf Read More
How to use google sites and indexnow?
I have an aggregator site for tips and betting predictions made using Google sites https://tips.saas-tips-sports.com/
I recently discovered the indexnow platform and would like to know if anyone knows if it can be used on Google sites.
Thank you in advance!
I have an aggregator site for tips and betting predictions made using Google sites https://tips.saas-tips-sports.com/
I recently discovered the indexnow platform and would like to know if anyone knows if it can be used on Google sites.
Thank you in advance! Read More
Windows Server Datacenter: Azure Edition preview build 26244 now available in Azure
Windows Server Datacenter: Azure Edition preview build 26244 now available in Azure
Hello Windows Server Insiders!
We welcome you to try Windows Server 2025 Datacenter: Azure Edition preview build 26244 in both Desktop experience and Core version on the Microsoft Server Operating Systems Preview offer in Azure. Azure Edition is optimized for operation in the Azure environment. For additional information, see Preview: Windows Server VNext Datacenter (Azure Edition) for Azure Automanage on Microsoft Docs. For more information about this build, see Announcing Windows Server Preview Build 26244 – Microsoft Community Hub.
Windows Server Datacenter: Azure Edition preview build 26244 now available in Azure
Hello Windows Server Insiders!
We welcome you to try Windows Server 2025 Datacenter: Azure Edition preview build 26244 in both Desktop experience and Core version on the Microsoft Server Operating Systems Preview offer in Azure. Azure Edition is optimized for operation in the Azure environment. For additional information, see Preview: Windows Server VNext Datacenter (Azure Edition) for Azure Automanage on Microsoft Docs. For more information about this build, see Announcing Windows Server Preview Build 26244 – Microsoft Community Hub. Read More
I need to connect physical modelling connection port to the output of a switch with 2 input. How can I establish this?
Post Content Post Content multiple source connection MATLAB Answers — New Questions
How to retrieve datas from multiples GUIs into a function ?
Hello everyone !
I have several GUI windows to collect parameters and I want to use them in functions.
The problem is, I store datas from edit text boxes into arrays like that :
typex=getappdata(hObject,’typex’);
typex(end+1)=str2double(handles.typex(1).String);
handles.typex(1).String=sprintf(‘block %d’,numel(typex)+1);
disp(typex)
setappdata(hObject,’typex’,typex);
assignin(‘base’,’typex’,typex);
Then, in a callback I use them in the same GUI:
xw=getappdata(handles.xw(1),’xw’);
xe=getappdata(handles.xe(1),’xe’);
nx=getappdata(handles.nx(1),’nx’);
typex=getappdata(handles.typex(1),’typex’);
%Choix du programme de rafinement a executer
if(typex==1)
n=length(nx);
for i=1:n
xwt=xw(i);
xet=xe(i);
nxt=nx(i);
create_block_uniform_X(xwt, xet, nxt)
end
That does works.
But in an other function, I use that to retrieve the datas:
X=getappdata(0,’X’)
Y=getappdata(0,’Y’)
Z=getappdata(0,’Z’)
nx=getappdata(0,’nx’)
xw=getappdata(0,’xw’)
xe=getappdata(0,’xe’)
ny=getappdata(0,’ny’)
yw=getappdata(0,’yw’)
ye=getappdata(0,’ye’)
nz=getappdata(0,’nz’)
zw=getappdata(0,’zw’)
ze=getappdata(0,’ze’)
The thing is that for X,Y,Z it does retrieve the datas (X, Y, Z are the outputs arguments from the previous fonction ‘create_block_uniform’) but that return empty arrays for the others… I don’t understand
Z =
Columns 1 through 13
0 1.1111 2.2222 3.3333 4.4444 5.5556 6.6667 7.7778 8.8889 10.0000 0 0 0
Columns 14 through 18
0 0 0 0 0
nx =
[]
xw =
[]
xe =
[]
Could someone help me ?
Thanks !Hello everyone !
I have several GUI windows to collect parameters and I want to use them in functions.
The problem is, I store datas from edit text boxes into arrays like that :
typex=getappdata(hObject,’typex’);
typex(end+1)=str2double(handles.typex(1).String);
handles.typex(1).String=sprintf(‘block %d’,numel(typex)+1);
disp(typex)
setappdata(hObject,’typex’,typex);
assignin(‘base’,’typex’,typex);
Then, in a callback I use them in the same GUI:
xw=getappdata(handles.xw(1),’xw’);
xe=getappdata(handles.xe(1),’xe’);
nx=getappdata(handles.nx(1),’nx’);
typex=getappdata(handles.typex(1),’typex’);
%Choix du programme de rafinement a executer
if(typex==1)
n=length(nx);
for i=1:n
xwt=xw(i);
xet=xe(i);
nxt=nx(i);
create_block_uniform_X(xwt, xet, nxt)
end
That does works.
But in an other function, I use that to retrieve the datas:
X=getappdata(0,’X’)
Y=getappdata(0,’Y’)
Z=getappdata(0,’Z’)
nx=getappdata(0,’nx’)
xw=getappdata(0,’xw’)
xe=getappdata(0,’xe’)
ny=getappdata(0,’ny’)
yw=getappdata(0,’yw’)
ye=getappdata(0,’ye’)
nz=getappdata(0,’nz’)
zw=getappdata(0,’zw’)
ze=getappdata(0,’ze’)
The thing is that for X,Y,Z it does retrieve the datas (X, Y, Z are the outputs arguments from the previous fonction ‘create_block_uniform’) but that return empty arrays for the others… I don’t understand
Z =
Columns 1 through 13
0 1.1111 2.2222 3.3333 4.4444 5.5556 6.6667 7.7778 8.8889 10.0000 0 0 0
Columns 14 through 18
0 0 0 0 0
nx =
[]
xw =
[]
xe =
[]
Could someone help me ?
Thanks ! Hello everyone !
I have several GUI windows to collect parameters and I want to use them in functions.
The problem is, I store datas from edit text boxes into arrays like that :
typex=getappdata(hObject,’typex’);
typex(end+1)=str2double(handles.typex(1).String);
handles.typex(1).String=sprintf(‘block %d’,numel(typex)+1);
disp(typex)
setappdata(hObject,’typex’,typex);
assignin(‘base’,’typex’,typex);
Then, in a callback I use them in the same GUI:
xw=getappdata(handles.xw(1),’xw’);
xe=getappdata(handles.xe(1),’xe’);
nx=getappdata(handles.nx(1),’nx’);
typex=getappdata(handles.typex(1),’typex’);
%Choix du programme de rafinement a executer
if(typex==1)
n=length(nx);
for i=1:n
xwt=xw(i);
xet=xe(i);
nxt=nx(i);
create_block_uniform_X(xwt, xet, nxt)
end
That does works.
But in an other function, I use that to retrieve the datas:
X=getappdata(0,’X’)
Y=getappdata(0,’Y’)
Z=getappdata(0,’Z’)
nx=getappdata(0,’nx’)
xw=getappdata(0,’xw’)
xe=getappdata(0,’xe’)
ny=getappdata(0,’ny’)
yw=getappdata(0,’yw’)
ye=getappdata(0,’ye’)
nz=getappdata(0,’nz’)
zw=getappdata(0,’zw’)
ze=getappdata(0,’ze’)
The thing is that for X,Y,Z it does retrieve the datas (X, Y, Z are the outputs arguments from the previous fonction ‘create_block_uniform’) but that return empty arrays for the others… I don’t understand
Z =
Columns 1 through 13
0 1.1111 2.2222 3.3333 4.4444 5.5556 6.6667 7.7778 8.8889 10.0000 0 0 0
Columns 14 through 18
0 0 0 0 0
nx =
[]
xw =
[]
xe =
[]
Could someone help me ?
Thanks ! store data MATLAB Answers — New Questions
sorting a simple list with 4 data columns
I have a simple list (last name, first name, month, day) of data to sort by Month/Day. I am totally unable to get it to sort anything. Have used Excel basically since its inception and never had trouble sorting by any number of variables. Help please.
I have a simple list (last name, first name, month, day) of data to sort by Month/Day. I am totally unable to get it to sort anything. Have used Excel basically since its inception and never had trouble sorting by any number of variables. Help please. Read More
Login problems with Matlab 2024a
I keep receiving the message "Unable to save login information. You are currently signed in but you will be prompted to sign in again the next time that you start this application." everytime I start the Matlab application.
I tried to follow all the steps I could find, such as reinstaling the Mathworks Service Host, eliminating the files at ‘%APPDATA%MathWorkscredentials’, ‘%APPDATA%RoamingMathWorksMATLAB’, reinstaling the Matlab 2024a. I don’t know what else to do in order to fix this problem.
Can you help me?I keep receiving the message "Unable to save login information. You are currently signed in but you will be prompted to sign in again the next time that you start this application." everytime I start the Matlab application.
I tried to follow all the steps I could find, such as reinstaling the Mathworks Service Host, eliminating the files at ‘%APPDATA%MathWorkscredentials’, ‘%APPDATA%RoamingMathWorksMATLAB’, reinstaling the Matlab 2024a. I don’t know what else to do in order to fix this problem.
Can you help me? I keep receiving the message "Unable to save login information. You are currently signed in but you will be prompted to sign in again the next time that you start this application." everytime I start the Matlab application.
I tried to follow all the steps I could find, such as reinstaling the Mathworks Service Host, eliminating the files at ‘%APPDATA%MathWorkscredentials’, ‘%APPDATA%RoamingMathWorksMATLAB’, reinstaling the Matlab 2024a. I don’t know what else to do in order to fix this problem.
Can you help me? login, r2024a, credentials MATLAB Answers — New Questions
How do I migrate from zoho mail to Office 365
Hello
Please i need your help on this issue.
I need assistance on how to migrate from Zoho Mail to Office 365 / Outlook
Hello Please i need your help on this issue. I need assistance on how to migrate from Zoho Mail to Office 365 / Outlook Read More
Error in data size using CIC filter in Simulink R2020b: The number of input rows must be a multiple of the decimation factor
I am trying a simple Simulink model of an NCO generating a sin and cos which I then use in their own respective CIC decimator to generate quad and real output signals.
In the two product blocks (X) I get an error "The number of input rows must be a multiple of the decimation factor". I tried adding the convert blocks and specifying output type fixdt(1,20,18), but that didn’t help. The NCO is generating the proper sin and cos with amplitude +/-1 and frequency 13.5MHz with a 256Mhz sample rate.
What is the trick to getting the CIC to work? I looked at a similar Matlab Example for a GSM dds and it worked, but there was nothing special done (that I could see) to make the CIC input data types correct. Please help, I’ve spent a day chasing this problem :(I am trying a simple Simulink model of an NCO generating a sin and cos which I then use in their own respective CIC decimator to generate quad and real output signals.
In the two product blocks (X) I get an error "The number of input rows must be a multiple of the decimation factor". I tried adding the convert blocks and specifying output type fixdt(1,20,18), but that didn’t help. The NCO is generating the proper sin and cos with amplitude +/-1 and frequency 13.5MHz with a 256Mhz sample rate.
What is the trick to getting the CIC to work? I looked at a similar Matlab Example for a GSM dds and it worked, but there was nothing special done (that I could see) to make the CIC input data types correct. Please help, I’ve spent a day chasing this problem 🙁 I am trying a simple Simulink model of an NCO generating a sin and cos which I then use in their own respective CIC decimator to generate quad and real output signals.
In the two product blocks (X) I get an error "The number of input rows must be a multiple of the decimation factor". I tried adding the convert blocks and specifying output type fixdt(1,20,18), but that didn’t help. The NCO is generating the proper sin and cos with amplitude +/-1 and frequency 13.5MHz with a 256Mhz sample rate.
What is the trick to getting the CIC to work? I looked at a similar Matlab Example for a GSM dds and it worked, but there was nothing special done (that I could see) to make the CIC input data types correct. Please help, I’ve spent a day chasing this problem 🙁 #cic, #simulink MATLAB Answers — New Questions
Slicing arrays and save it in the file
Hello,
I have a file of the following form:
data condition device
-297.367190000000 8 1
-295.132890000000 8 1
-268.007000000000 8 2
-268.007000000000 8 2
-262.109380000000 7 1
-263.296880000000 7 1
-263.562500000000 7 2
-263.562500000000 7 2
-258.973210000000 6 1
-255.209820000000 6 1
-255.209820000000 6 2
-255.209820000000 6 2
I would like to process the data being a slice of array for the given condition and device for instance one slice would be:
-297.367190000000 8 1
-295.132890000000 8 1
and save the result in file with the following format for instance for the data above:
dataProcessed_condition8_device1
How could I cut such slice and save it in the file of the described format?
Regards
ElzbietaHello,
I have a file of the following form:
data condition device
-297.367190000000 8 1
-295.132890000000 8 1
-268.007000000000 8 2
-268.007000000000 8 2
-262.109380000000 7 1
-263.296880000000 7 1
-263.562500000000 7 2
-263.562500000000 7 2
-258.973210000000 6 1
-255.209820000000 6 1
-255.209820000000 6 2
-255.209820000000 6 2
I would like to process the data being a slice of array for the given condition and device for instance one slice would be:
-297.367190000000 8 1
-295.132890000000 8 1
and save the result in file with the following format for instance for the data above:
dataProcessed_condition8_device1
How could I cut such slice and save it in the file of the described format?
Regards
Elzbieta Hello,
I have a file of the following form:
data condition device
-297.367190000000 8 1
-295.132890000000 8 1
-268.007000000000 8 2
-268.007000000000 8 2
-262.109380000000 7 1
-263.296880000000 7 1
-263.562500000000 7 2
-263.562500000000 7 2
-258.973210000000 6 1
-255.209820000000 6 1
-255.209820000000 6 2
-255.209820000000 6 2
I would like to process the data being a slice of array for the given condition and device for instance one slice would be:
-297.367190000000 8 1
-295.132890000000 8 1
and save the result in file with the following format for instance for the data above:
dataProcessed_condition8_device1
How could I cut such slice and save it in the file of the described format?
Regards
Elzbieta slice array MATLAB Answers — New Questions
Trying to send mail on port 587: Client not authenticated to send mail
Wondering if I can get some help. I have a mailbox o365 (email address removed for privacy reasons) that I need to send emails using 587 but getting:
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 Client not authenticated to send mail. Error: 535 5.7.139 Authentication unsuccessful, the user credentials were incorrect
Things I’ve done so far:
* I’ve set “SmtpClientAuthenticationDisabled” to False
* I have tried both “smtp.office365.com” and “mydomain.mail.protection.outlook.com”
* When testing the connection “Test-NetConnection” it connects ok with both 25 and 587
I found this post
https://learn.microsoft.com/en-us/answers/questions/512954/535-5-7-139-authentication-unsuccessful
Link to the comment
When creating a new mailbox on o365 it was able to send ok on 587/25. The original application mailbox is an onprem user that was moved to o365 if that makes any difference while the new mailbox is o365 only.
I also tried setting up a new “Authentication” policy:
New-AuthenticationPolicy -Name “Allow Basic Auth SMTP” -AllowBasicAuthSmtp:$true
Then adding applications@mydomain to that policy but its still the same.
I looked into smtp2go a while back for another account but management being management it never materialized. This was got dropped on my lap like a hot potato and I’m embarrassed to say that I’m actually struggling to figure out where I’m going wrong.
Wondering if I can get some help. I have a mailbox o365 (email address removed for privacy reasons) that I need to send emails using 587 but getting: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 Client not authenticated to send mail. Error: 535 5.7.139 Authentication unsuccessful, the user credentials were incorrect Things I’ve done so far:* I’ve set “SmtpClientAuthenticationDisabled” to False* I have tried both “smtp.office365.com” and “mydomain.mail.protection.outlook.com”* When testing the connection “Test-NetConnection” it connects ok with both 25 and 587I found this posthttps://learn.microsoft.com/en-us/answers/questions/512954/535-5-7-139-authentication-unsuccessful Link to the commenthttps://imgur.com/a/sQbgWxx When creating a new mailbox on o365 it was able to send ok on 587/25. The original application mailbox is an onprem user that was moved to o365 if that makes any difference while the new mailbox is o365 only.I also tried setting up a new “Authentication” policy: New-AuthenticationPolicy -Name “Allow Basic Auth SMTP” -AllowBasicAuthSmtp:$true Then adding applications@mydomain to that policy but its still the same. I looked into smtp2go a while back for another account but management being management it never materialized. This was got dropped on my lap like a hot potato and I’m embarrassed to say that I’m actually struggling to figure out where I’m going wrong. Read More
MCT renewal process steps for now ? as not able to access lounge and other enrolment tools for the
MCT renewal process steps for now ? as not able to access lounge and other enrolment tools for the
MCT renewal process steps for now ? as not able to access lounge and other enrolment tools for the Read More
Error message when using timers in AppDesigner after a few seconds running
I’m quite new to using timers in Matlab, and currently I’m running a project that will need them to continuously update some info in our App Designer window. The problem is, I followed the instructions in this tutorial from Matlab and initially my timer and callback function work normally. But after some time of it running I receive the following error message:
Error while evaluating TimerFcn for timer ‘timer-1’
Not enough input arguments.
I currently initialize my timer in the startupFcn of the app as:
function startupFcn(app)
global params
app.textbox_Log.Value = {‘Start’};
app.timerCounter1sec = 0;
app.timerCounter10sec = 0;
app.logStatus = ‘running’;
app.timer500ms = timer(‘Period’,0.5,…
‘ExecutionMode’, ‘fixedSpacing’, …
‘TasksToExecute’, Inf, …
‘BusyMode’, ‘drop’, …
‘TimerFcn’, @app.timerTest);
start(app.timer500ms);
updateJobList(app, params);
fillJobsTable(app, params);
end
And my callback function is defined as the following (I will omit the code for now since I don’t think it’s that important right now):
function timerTest(app,~,~)
% Function details…
end
Can someone help me with this? I have no clue of what is happening to throw this error in the timer, even considering that it works for around 3-4 seconds before breaking.I’m quite new to using timers in Matlab, and currently I’m running a project that will need them to continuously update some info in our App Designer window. The problem is, I followed the instructions in this tutorial from Matlab and initially my timer and callback function work normally. But after some time of it running I receive the following error message:
Error while evaluating TimerFcn for timer ‘timer-1’
Not enough input arguments.
I currently initialize my timer in the startupFcn of the app as:
function startupFcn(app)
global params
app.textbox_Log.Value = {‘Start’};
app.timerCounter1sec = 0;
app.timerCounter10sec = 0;
app.logStatus = ‘running’;
app.timer500ms = timer(‘Period’,0.5,…
‘ExecutionMode’, ‘fixedSpacing’, …
‘TasksToExecute’, Inf, …
‘BusyMode’, ‘drop’, …
‘TimerFcn’, @app.timerTest);
start(app.timer500ms);
updateJobList(app, params);
fillJobsTable(app, params);
end
And my callback function is defined as the following (I will omit the code for now since I don’t think it’s that important right now):
function timerTest(app,~,~)
% Function details…
end
Can someone help me with this? I have no clue of what is happening to throw this error in the timer, even considering that it works for around 3-4 seconds before breaking. I’m quite new to using timers in Matlab, and currently I’m running a project that will need them to continuously update some info in our App Designer window. The problem is, I followed the instructions in this tutorial from Matlab and initially my timer and callback function work normally. But after some time of it running I receive the following error message:
Error while evaluating TimerFcn for timer ‘timer-1’
Not enough input arguments.
I currently initialize my timer in the startupFcn of the app as:
function startupFcn(app)
global params
app.textbox_Log.Value = {‘Start’};
app.timerCounter1sec = 0;
app.timerCounter10sec = 0;
app.logStatus = ‘running’;
app.timer500ms = timer(‘Period’,0.5,…
‘ExecutionMode’, ‘fixedSpacing’, …
‘TasksToExecute’, Inf, …
‘BusyMode’, ‘drop’, …
‘TimerFcn’, @app.timerTest);
start(app.timer500ms);
updateJobList(app, params);
fillJobsTable(app, params);
end
And my callback function is defined as the following (I will omit the code for now since I don’t think it’s that important right now):
function timerTest(app,~,~)
% Function details…
end
Can someone help me with this? I have no clue of what is happening to throw this error in the timer, even considering that it works for around 3-4 seconds before breaking. timer, appdesigner, app designer, handles, error, input argument MATLAB Answers — New Questions
Problem with Fast Restart and Simulink Scenario Reader
Hello everyone,
I’m trying to train an RL agent on a vehicle to brake when encountering a pedestrian. I have set up a scenario using the driving scenario toolbox and everything in simulink to make it work.
I just have one problem: I’d like to randomize the pedestrian’s position, so I created a random function in the scenario definition script, but when I use fast restart the scenario reader gets stuck on the first simulation scenario. If I don’t, Simulink recompiles and everything works.
Is there a way to not disable fast restart, but still completely restart the scenario with variations?Hello everyone,
I’m trying to train an RL agent on a vehicle to brake when encountering a pedestrian. I have set up a scenario using the driving scenario toolbox and everything in simulink to make it work.
I just have one problem: I’d like to randomize the pedestrian’s position, so I created a random function in the scenario definition script, but when I use fast restart the scenario reader gets stuck on the first simulation scenario. If I don’t, Simulink recompiles and everything works.
Is there a way to not disable fast restart, but still completely restart the scenario with variations? Hello everyone,
I’m trying to train an RL agent on a vehicle to brake when encountering a pedestrian. I have set up a scenario using the driving scenario toolbox and everything in simulink to make it work.
I just have one problem: I’d like to randomize the pedestrian’s position, so I created a random function in the scenario definition script, but when I use fast restart the scenario reader gets stuck on the first simulation scenario. If I don’t, Simulink recompiles and everything works.
Is there a way to not disable fast restart, but still completely restart the scenario with variations? fast restart, driving scenario, reinforcement learning toolbox, reset scenario MATLAB Answers — New Questions