Category: News
Trying to adjust weighting on PART of a sigmoid fit
I included a picture of the current fit that I am getting, what is in black is the actual data. So far the fit is pretty good but my PI would like it to fit a bit better and he suggested weighting the first part of the fit less than the later parts since we really only care from about 500 seconds onwards. Any suggestions on how to do this? I can include the actual matlab file for the fit if that would be helpful for anyone
Thanks!I included a picture of the current fit that I am getting, what is in black is the actual data. So far the fit is pretty good but my PI would like it to fit a bit better and he suggested weighting the first part of the fit less than the later parts since we really only care from about 500 seconds onwards. Any suggestions on how to do this? I can include the actual matlab file for the fit if that would be helpful for anyone
Thanks! I included a picture of the current fit that I am getting, what is in black is the actual data. So far the fit is pretty good but my PI would like it to fit a bit better and he suggested weighting the first part of the fit less than the later parts since we really only care from about 500 seconds onwards. Any suggestions on how to do this? I can include the actual matlab file for the fit if that would be helpful for anyone
Thanks! sigmoid, image processing, curve fitting MATLAB Answers — New Questions
Flags for Resources
I have more than 20 group resource on my project, so i need more flags to create a color for each. How can I add more flags?
I have more than 20 group resource on my project, so i need more flags to create a color for each. How can I add more flags? Read More
SharePoint sites
Hello
Please i need your help on this issue.
I would like know when ever i upload a document to SharePoint sites it is going to my OneDrive storage, but i want it to stay in SharePoint.
Hello Please i need your help on this issue. I would like know when ever i upload a document to SharePoint sites it is going to my OneDrive storage, but i want it to stay in SharePoint. Read More
Get the Isocline from a know levelset plot (Contours) and the function output (Height)
I was checking the function fcontour that we can use to get the contours like the following one.
I took the given example:
f = @(x,y) exp(-(x/3).^2-(y/3).^2) + exp(-(x+2).^2-(y+2).^2);
fc = fcontour(f)
Now, I would like to see the heights of each contour.
Suppose I have the height value, how do I get the points that belong the contour that corresponds to the height.
Regards…I was checking the function fcontour that we can use to get the contours like the following one.
I took the given example:
f = @(x,y) exp(-(x/3).^2-(y/3).^2) + exp(-(x+2).^2-(y+2).^2);
fc = fcontour(f)
Now, I would like to see the heights of each contour.
Suppose I have the height value, how do I get the points that belong the contour that corresponds to the height.
Regards… I was checking the function fcontour that we can use to get the contours like the following one.
I took the given example:
f = @(x,y) exp(-(x/3).^2-(y/3).^2) + exp(-(x+2).^2-(y+2).^2);
fc = fcontour(f)
Now, I would like to see the heights of each contour.
Suppose I have the height value, how do I get the points that belong the contour that corresponds to the height.
Regards… fcontour, levelset, isoclines MATLAB Answers — New Questions
What To Do When Getting QBmapi64 out of memory error on windows 10/11
Using the 64-bit version of Windows 11 on Desktop 23
My computer updated from Windows 10 to Windows 11 last night, and now I’m receiving the message “qbmapi64 out of memory”
Please Help me.
Using the 64-bit version of Windows 11 on Desktop 23My computer updated from Windows 10 to Windows 11 last night, and now I’m receiving the message “qbmapi64 out of memory”Please Help me. Read More
Creating a loop for repeated vector values
Hi,
I am attempting to setup a massive vector made up of Current values for a battery model. Before this piece of code I have included, the PosAccelReqCurrent already has 15 values. Is it possible to make a loop to repeat the values below for x amount of times rather than just copy and pasting it x times? It would make my code a lot of more efficient rather than having thousands of lines of the same code.
As further context, this code is to create many repeated current cycles to test battery degredation over time. Apologies if I have not added enough explanation.
Thank you.
%%%%%%%%%%%%%%%
maxPARC = length(PosAccelReqCurrent);
for x=1:6500
PosAccelReqCurrent(maxPARC+x)=PosAccelReqCurrent(15);
end
for x=1:6500
ActVel(maxPARC+x)=ActVel(15);
end
maxPARC = length(PosAccelReqCurrent);
for x=1:100
PosAccelReqCurrent(maxPARC+x)=0;
end
for x=1:100
ActVel(maxPARC+x)=ActVel(15);
end
maxPARC = length(PosAccelReqCurrent);
for x=1:3470
PosAccelReqCurrent(maxPARC+x)=15;
end
for x=1:3470
ActVel(maxPARC+x)=0;
end
%%%%%%%%%%%%%%%%%%%%Hi,
I am attempting to setup a massive vector made up of Current values for a battery model. Before this piece of code I have included, the PosAccelReqCurrent already has 15 values. Is it possible to make a loop to repeat the values below for x amount of times rather than just copy and pasting it x times? It would make my code a lot of more efficient rather than having thousands of lines of the same code.
As further context, this code is to create many repeated current cycles to test battery degredation over time. Apologies if I have not added enough explanation.
Thank you.
%%%%%%%%%%%%%%%
maxPARC = length(PosAccelReqCurrent);
for x=1:6500
PosAccelReqCurrent(maxPARC+x)=PosAccelReqCurrent(15);
end
for x=1:6500
ActVel(maxPARC+x)=ActVel(15);
end
maxPARC = length(PosAccelReqCurrent);
for x=1:100
PosAccelReqCurrent(maxPARC+x)=0;
end
for x=1:100
ActVel(maxPARC+x)=ActVel(15);
end
maxPARC = length(PosAccelReqCurrent);
for x=1:3470
PosAccelReqCurrent(maxPARC+x)=15;
end
for x=1:3470
ActVel(maxPARC+x)=0;
end
%%%%%%%%%%%%%%%%%%%% Hi,
I am attempting to setup a massive vector made up of Current values for a battery model. Before this piece of code I have included, the PosAccelReqCurrent already has 15 values. Is it possible to make a loop to repeat the values below for x amount of times rather than just copy and pasting it x times? It would make my code a lot of more efficient rather than having thousands of lines of the same code.
As further context, this code is to create many repeated current cycles to test battery degredation over time. Apologies if I have not added enough explanation.
Thank you.
%%%%%%%%%%%%%%%
maxPARC = length(PosAccelReqCurrent);
for x=1:6500
PosAccelReqCurrent(maxPARC+x)=PosAccelReqCurrent(15);
end
for x=1:6500
ActVel(maxPARC+x)=ActVel(15);
end
maxPARC = length(PosAccelReqCurrent);
for x=1:100
PosAccelReqCurrent(maxPARC+x)=0;
end
for x=1:100
ActVel(maxPARC+x)=ActVel(15);
end
maxPARC = length(PosAccelReqCurrent);
for x=1:3470
PosAccelReqCurrent(maxPARC+x)=15;
end
for x=1:3470
ActVel(maxPARC+x)=0;
end
%%%%%%%%%%%%%%%%%%%% loops, batterymodel MATLAB Answers — New Questions
Pnp Modern Search Results shows duplicate values
Hi all,
I have a PnP Modern Search and the results webpart shows only for one column double entries.
So in my case for the telephone number value it shows: “+1234 56789 +1234 56789”.
It is only in the results this way the list entries are fine. I only map one crawled property to one managed property.
I have already reindexed and also deleted the list.
Any ideas ?
Hi all,I have a PnP Modern Search and the results webpart shows only for one column double entries. So in my case for the telephone number value it shows: “+1234 56789 +1234 56789”.It is only in the results this way the list entries are fine. I only map one crawled property to one managed property. I have already reindexed and also deleted the list.Any ideas ? Read More
Processing 5 input of matrices into a fuzzy logic system
Sir Arkadiy Turevskiy,
I read your answer about ‘Processing a list of inputs into a fuzzy logic system. I have a similar question, I want to process 5 input matrices (207*216) to take 1 output matrices (207*216). I have five separate matrices text file loaded in workspace(input1=slope_text, input2=jeo_text, input3=pop_text, input4=land_text, input5=stream_text)
[System]
Name=’Suitability2′
Type=’mamdani’
Version=2.0
NumInputs=5
NumOutputs=1
NumRules=108
AndMethod=’min’
OrMethod=’max’
ImpMethod=’min’
AggMethod=’max’
DefuzzMethod=’centroid’
[Input1]
Name=’EĞİM’
Range=[0 10]
NumMFs=3
MF1=’very_suitable’:’trapmf’,[-4.5 -0.5 2 5]
MF2=’moderately_suitable’:’trapmf’,[2 5 7 10]
MF3=’unsuitable’:’trapmf’,[7 10 11 40]
[Input2]
Name=’JEOLOJİ’
Range=[0 10]
NumMFs=2
MF1=’suitable’:’trapmf’,[4 8 10 13.75]
MF2=’unsuitable’:’trapmf’,[-4.5 -2 1 2]
[Input3]
Name=’NÜFUS’
Range=[0 98399]
NumMFs=3
MF1=’LOW’:’trimf’,[0 9976 25470]
MF2=’HIGH’:’trimf’,[72460 98400 1000000]
MF3=’medium’:’trimf’,[25470 46380 72460]
[Input4]
Name=’ARAZİ_KULLANIMI’
Range=[0 10]
NumMFs=2
MF1=’Unsuitable’:’trimf’,[0 0 6]
MF2=’Suitable’:’trimf’,[6 10 10]
[Input5]
Name=’YÜZEYSEL_AKIŞ’
Range=[0 10]
NumMFs=3
MF1=’low’:’trimf’,[1 2 3]
MF2=’high’:’trimf’,[5 6 7]
MF3=’medium’:’trimf’,[3 4 5]
[Output1]
Name=’UYGUNLUK_DEĞERİ’
Range=[0 100]
NumMFs=3
MF1=’POOR’:’trapmf’,[-4.46 0 10 40]
MF2=’GOOD’:’trimf’,[25 50 75]
MF3=’EXCELLENT’:’trapmf’,[60 90 100 100]Sir Arkadiy Turevskiy,
I read your answer about ‘Processing a list of inputs into a fuzzy logic system. I have a similar question, I want to process 5 input matrices (207*216) to take 1 output matrices (207*216). I have five separate matrices text file loaded in workspace(input1=slope_text, input2=jeo_text, input3=pop_text, input4=land_text, input5=stream_text)
[System]
Name=’Suitability2′
Type=’mamdani’
Version=2.0
NumInputs=5
NumOutputs=1
NumRules=108
AndMethod=’min’
OrMethod=’max’
ImpMethod=’min’
AggMethod=’max’
DefuzzMethod=’centroid’
[Input1]
Name=’EĞİM’
Range=[0 10]
NumMFs=3
MF1=’very_suitable’:’trapmf’,[-4.5 -0.5 2 5]
MF2=’moderately_suitable’:’trapmf’,[2 5 7 10]
MF3=’unsuitable’:’trapmf’,[7 10 11 40]
[Input2]
Name=’JEOLOJİ’
Range=[0 10]
NumMFs=2
MF1=’suitable’:’trapmf’,[4 8 10 13.75]
MF2=’unsuitable’:’trapmf’,[-4.5 -2 1 2]
[Input3]
Name=’NÜFUS’
Range=[0 98399]
NumMFs=3
MF1=’LOW’:’trimf’,[0 9976 25470]
MF2=’HIGH’:’trimf’,[72460 98400 1000000]
MF3=’medium’:’trimf’,[25470 46380 72460]
[Input4]
Name=’ARAZİ_KULLANIMI’
Range=[0 10]
NumMFs=2
MF1=’Unsuitable’:’trimf’,[0 0 6]
MF2=’Suitable’:’trimf’,[6 10 10]
[Input5]
Name=’YÜZEYSEL_AKIŞ’
Range=[0 10]
NumMFs=3
MF1=’low’:’trimf’,[1 2 3]
MF2=’high’:’trimf’,[5 6 7]
MF3=’medium’:’trimf’,[3 4 5]
[Output1]
Name=’UYGUNLUK_DEĞERİ’
Range=[0 100]
NumMFs=3
MF1=’POOR’:’trapmf’,[-4.46 0 10 40]
MF2=’GOOD’:’trimf’,[25 50 75]
MF3=’EXCELLENT’:’trapmf’,[60 90 100 100] Sir Arkadiy Turevskiy,
I read your answer about ‘Processing a list of inputs into a fuzzy logic system. I have a similar question, I want to process 5 input matrices (207*216) to take 1 output matrices (207*216). I have five separate matrices text file loaded in workspace(input1=slope_text, input2=jeo_text, input3=pop_text, input4=land_text, input5=stream_text)
[System]
Name=’Suitability2′
Type=’mamdani’
Version=2.0
NumInputs=5
NumOutputs=1
NumRules=108
AndMethod=’min’
OrMethod=’max’
ImpMethod=’min’
AggMethod=’max’
DefuzzMethod=’centroid’
[Input1]
Name=’EĞİM’
Range=[0 10]
NumMFs=3
MF1=’very_suitable’:’trapmf’,[-4.5 -0.5 2 5]
MF2=’moderately_suitable’:’trapmf’,[2 5 7 10]
MF3=’unsuitable’:’trapmf’,[7 10 11 40]
[Input2]
Name=’JEOLOJİ’
Range=[0 10]
NumMFs=2
MF1=’suitable’:’trapmf’,[4 8 10 13.75]
MF2=’unsuitable’:’trapmf’,[-4.5 -2 1 2]
[Input3]
Name=’NÜFUS’
Range=[0 98399]
NumMFs=3
MF1=’LOW’:’trimf’,[0 9976 25470]
MF2=’HIGH’:’trimf’,[72460 98400 1000000]
MF3=’medium’:’trimf’,[25470 46380 72460]
[Input4]
Name=’ARAZİ_KULLANIMI’
Range=[0 10]
NumMFs=2
MF1=’Unsuitable’:’trimf’,[0 0 6]
MF2=’Suitable’:’trimf’,[6 10 10]
[Input5]
Name=’YÜZEYSEL_AKIŞ’
Range=[0 10]
NumMFs=3
MF1=’low’:’trimf’,[1 2 3]
MF2=’high’:’trimf’,[5 6 7]
MF3=’medium’:’trimf’,[3 4 5]
[Output1]
Name=’UYGUNLUK_DEĞERİ’
Range=[0 100]
NumMFs=3
MF1=’POOR’:’trapmf’,[-4.46 0 10 40]
MF2=’GOOD’:’trimf’,[25 50 75]
MF3=’EXCELLENT’:’trapmf’,[60 90 100 100] fuzzy logic MATLAB Answers — New Questions
What To Do When Unable to Send QuickBooks Emails Through Outlook
when trying to send emails from QuickBooks to outlook i get an error that says Unable to Send QuickBooks Emails Through Outlook, restart outlook…this doesn’t work.
when trying to send emails from QuickBooks to outlook i get an error that says Unable to Send QuickBooks Emails Through Outlook, restart outlook…this doesn’t work. Read More
Solving ODE system with a constraint/boundary condition
Hello,
I am trying to simulate a chemical reaction in a tubular reactor. The reaction is in this form: A -> B + 6 C.
The reaction is a gas phase reaction and the reaction rate is a function of the partial pressures of the three components. I solved the mass balances for steady state (and some other assumtions) and came up with these equations:
I implemented them as an ODE system and want to solve this system via ode45. The code runs without an error but the solution does not fulfill the physical boundary condition, that the sum of all partial pressure has to be the system pressure at all times, or at all positions.
Is there any way to implement a sort of boundary condition, which can be solved by ode45?
See my code below. Please consider that the values for the parameters are arbitrary.
%% Definition of constant parameters
d = 0.028; % tube diameter [m]
length = 0.84; % tube length [m]
A = pi()/4*d^2; % Area [m^2]
V_reactor = A*length; % Reaction volume [m^3]
m_kat = 0.3; % catalyst mass [kg]
rho_packing = m_kat/(V_reactor)*1000; % catalyst density [kg m^-3]
T_shell = 330; % Reaction temperature [°C]
T_shell = T_shell+273.15; % Reaction temperature [K]
p = 4; % reaction pressure [bara]
V_in = 5/60; %inlet stream [m^3 s^-1]
v_z = V_in/A; % velocity [m s^-1]
R = 8.314; % J mol^-1 K^-1
%Starting partial pressures
p_B_in = 1e-4;
p_C_in = 1e-4;
p_A_in = p-p_B_in-p_C_in;
T_in = T_shell;
%Reaction parameters
ReactionRate.k0 = 150;
ReactionRate.EA = 100000;
ReactionRate.a = -0.5;
ReactionRate.m = 1;
ReactionRate.n = -0.5;
%% Calculation of equilibrium constant
eq = @(p,T)(exp((0.06206+p.*0.00176).*((773.15-T)-(443.46876-99.02783.*log(p+5.73037)))))./(1+exp((0.06206+p*0.00176).*((773.15-T)-(443.46876-99.02783.*log(p+5.73037)))));
K_eq_function = @(p,T)((1-eq(p,T))/(eq(p,T)));
K_eq = K_eq_function(p,T_shell);
% Solving ODE system
dz = 0.01; %step size
[z,c] = ode45(@(z, c) ODE_System(z, c, v_z, rho_packing, ReactionRate, R, T_shell, K_eq),0:dz:1,[p_B_in, p_A_in, p_C_in]);
%%Definition of ODE system
function [ddz] = ODE_System(~,c,v_z,rho_packing,ReactionRate,R,T_shell,K_eq)
ddz(1) = ((R*T_shell)/v_z*rho_packing*(((c(3))^ReactionRate.a*ReactionRate.k0*exp(-ReactionRate.EA/ (R*T_shell))*(c(2))^ReactionRate.m*(c(1))^ReactionRate.n*(1-(c(1)/(c(2)*K_eq)))))); % mass balance for B
ddz(2) = (-(R*T_shell)/v_z*rho_packing*(((c(3))^ReactionRate.a*ReactionRate.k0*exp(-ReactionRate.EA/(R*T_shell))*(c(2))^ReactionRate.m*(c(1))^ReactionRate.n*(1-(c(1)/(c(2)*K_eq)))))); % mass balance for A
ddz(3) = 6*((R*T_shell)/v_z*rho_packing*(((c(3))^ReactionRate.a*ReactionRate.k0*exp(-ReactionRate.EA/(R*T_shell))*(c(2))^ReactionRate.m*(c(1))^ReactionRate.n*(1-(c(1)/(c(2)*K_eq)))))); % mass balance for C
ddz = ddz’;
end
The condition which has to be fulfilled at any time would be:
Thank you in advance.Hello,
I am trying to simulate a chemical reaction in a tubular reactor. The reaction is in this form: A -> B + 6 C.
The reaction is a gas phase reaction and the reaction rate is a function of the partial pressures of the three components. I solved the mass balances for steady state (and some other assumtions) and came up with these equations:
I implemented them as an ODE system and want to solve this system via ode45. The code runs without an error but the solution does not fulfill the physical boundary condition, that the sum of all partial pressure has to be the system pressure at all times, or at all positions.
Is there any way to implement a sort of boundary condition, which can be solved by ode45?
See my code below. Please consider that the values for the parameters are arbitrary.
%% Definition of constant parameters
d = 0.028; % tube diameter [m]
length = 0.84; % tube length [m]
A = pi()/4*d^2; % Area [m^2]
V_reactor = A*length; % Reaction volume [m^3]
m_kat = 0.3; % catalyst mass [kg]
rho_packing = m_kat/(V_reactor)*1000; % catalyst density [kg m^-3]
T_shell = 330; % Reaction temperature [°C]
T_shell = T_shell+273.15; % Reaction temperature [K]
p = 4; % reaction pressure [bara]
V_in = 5/60; %inlet stream [m^3 s^-1]
v_z = V_in/A; % velocity [m s^-1]
R = 8.314; % J mol^-1 K^-1
%Starting partial pressures
p_B_in = 1e-4;
p_C_in = 1e-4;
p_A_in = p-p_B_in-p_C_in;
T_in = T_shell;
%Reaction parameters
ReactionRate.k0 = 150;
ReactionRate.EA = 100000;
ReactionRate.a = -0.5;
ReactionRate.m = 1;
ReactionRate.n = -0.5;
%% Calculation of equilibrium constant
eq = @(p,T)(exp((0.06206+p.*0.00176).*((773.15-T)-(443.46876-99.02783.*log(p+5.73037)))))./(1+exp((0.06206+p*0.00176).*((773.15-T)-(443.46876-99.02783.*log(p+5.73037)))));
K_eq_function = @(p,T)((1-eq(p,T))/(eq(p,T)));
K_eq = K_eq_function(p,T_shell);
% Solving ODE system
dz = 0.01; %step size
[z,c] = ode45(@(z, c) ODE_System(z, c, v_z, rho_packing, ReactionRate, R, T_shell, K_eq),0:dz:1,[p_B_in, p_A_in, p_C_in]);
%%Definition of ODE system
function [ddz] = ODE_System(~,c,v_z,rho_packing,ReactionRate,R,T_shell,K_eq)
ddz(1) = ((R*T_shell)/v_z*rho_packing*(((c(3))^ReactionRate.a*ReactionRate.k0*exp(-ReactionRate.EA/ (R*T_shell))*(c(2))^ReactionRate.m*(c(1))^ReactionRate.n*(1-(c(1)/(c(2)*K_eq)))))); % mass balance for B
ddz(2) = (-(R*T_shell)/v_z*rho_packing*(((c(3))^ReactionRate.a*ReactionRate.k0*exp(-ReactionRate.EA/(R*T_shell))*(c(2))^ReactionRate.m*(c(1))^ReactionRate.n*(1-(c(1)/(c(2)*K_eq)))))); % mass balance for A
ddz(3) = 6*((R*T_shell)/v_z*rho_packing*(((c(3))^ReactionRate.a*ReactionRate.k0*exp(-ReactionRate.EA/(R*T_shell))*(c(2))^ReactionRate.m*(c(1))^ReactionRate.n*(1-(c(1)/(c(2)*K_eq)))))); % mass balance for C
ddz = ddz’;
end
The condition which has to be fulfilled at any time would be:
Thank you in advance. Hello,
I am trying to simulate a chemical reaction in a tubular reactor. The reaction is in this form: A -> B + 6 C.
The reaction is a gas phase reaction and the reaction rate is a function of the partial pressures of the three components. I solved the mass balances for steady state (and some other assumtions) and came up with these equations:
I implemented them as an ODE system and want to solve this system via ode45. The code runs without an error but the solution does not fulfill the physical boundary condition, that the sum of all partial pressure has to be the system pressure at all times, or at all positions.
Is there any way to implement a sort of boundary condition, which can be solved by ode45?
See my code below. Please consider that the values for the parameters are arbitrary.
%% Definition of constant parameters
d = 0.028; % tube diameter [m]
length = 0.84; % tube length [m]
A = pi()/4*d^2; % Area [m^2]
V_reactor = A*length; % Reaction volume [m^3]
m_kat = 0.3; % catalyst mass [kg]
rho_packing = m_kat/(V_reactor)*1000; % catalyst density [kg m^-3]
T_shell = 330; % Reaction temperature [°C]
T_shell = T_shell+273.15; % Reaction temperature [K]
p = 4; % reaction pressure [bara]
V_in = 5/60; %inlet stream [m^3 s^-1]
v_z = V_in/A; % velocity [m s^-1]
R = 8.314; % J mol^-1 K^-1
%Starting partial pressures
p_B_in = 1e-4;
p_C_in = 1e-4;
p_A_in = p-p_B_in-p_C_in;
T_in = T_shell;
%Reaction parameters
ReactionRate.k0 = 150;
ReactionRate.EA = 100000;
ReactionRate.a = -0.5;
ReactionRate.m = 1;
ReactionRate.n = -0.5;
%% Calculation of equilibrium constant
eq = @(p,T)(exp((0.06206+p.*0.00176).*((773.15-T)-(443.46876-99.02783.*log(p+5.73037)))))./(1+exp((0.06206+p*0.00176).*((773.15-T)-(443.46876-99.02783.*log(p+5.73037)))));
K_eq_function = @(p,T)((1-eq(p,T))/(eq(p,T)));
K_eq = K_eq_function(p,T_shell);
% Solving ODE system
dz = 0.01; %step size
[z,c] = ode45(@(z, c) ODE_System(z, c, v_z, rho_packing, ReactionRate, R, T_shell, K_eq),0:dz:1,[p_B_in, p_A_in, p_C_in]);
%%Definition of ODE system
function [ddz] = ODE_System(~,c,v_z,rho_packing,ReactionRate,R,T_shell,K_eq)
ddz(1) = ((R*T_shell)/v_z*rho_packing*(((c(3))^ReactionRate.a*ReactionRate.k0*exp(-ReactionRate.EA/ (R*T_shell))*(c(2))^ReactionRate.m*(c(1))^ReactionRate.n*(1-(c(1)/(c(2)*K_eq)))))); % mass balance for B
ddz(2) = (-(R*T_shell)/v_z*rho_packing*(((c(3))^ReactionRate.a*ReactionRate.k0*exp(-ReactionRate.EA/(R*T_shell))*(c(2))^ReactionRate.m*(c(1))^ReactionRate.n*(1-(c(1)/(c(2)*K_eq)))))); % mass balance for A
ddz(3) = 6*((R*T_shell)/v_z*rho_packing*(((c(3))^ReactionRate.a*ReactionRate.k0*exp(-ReactionRate.EA/(R*T_shell))*(c(2))^ReactionRate.m*(c(1))^ReactionRate.n*(1-(c(1)/(c(2)*K_eq)))))); % mass balance for C
ddz = ddz’;
end
The condition which has to be fulfilled at any time would be:
Thank you in advance. ode, ode45, boundary condition MATLAB Answers — New Questions
Next-Gen Customer Service: Azure’s AI-Powered Speech, Translation and Summarization
Active Azure subscription. If you don’t have an Azure subscription, you can create one for free
Create a Speech resource in the Azure portal.
Create a Translator resource in the Azure portal.
Create a Language resource in the Azure portal
Create a Container Registry in the Azure portal.
Create Azure Web PubSub for Socket.IO resource using
NODE_ENV=’development’
PORT=3000
SOCKET_PORT=29011
SOCKET_ENDPOINT=https://<SOCKET_IO_SERVICE>.webpubsub.azure.com
SOCKET_CONNECTION_STRING=<SOCKET_IO_CONNECTION_STRING>
SPEECH_KEY=<SPEECH_KEY>
SPEECH_REGION=westeurope
LANGUAGE_KEY=<LANGUAGE_KEY>
LANGUAGE_REGION=westeurope
LANGUAGE_ENDPOINT=https://<LANGUAGE_SERVICE>.cognitiveservices.azure.com/
TRANSLATE_KEY=<TRANSLATE_KEY>
TRANSLATE_ENDPOINT=https://api.cognitive.microsofttranslator.com/
TRANSLATE_REGION=westeurope
LOCATION=westeurope
CONTAINER_APP_NAME=aiservices
CONTAINER_APP_IMAGE=<CONTAINER_REGISTRY>.azurecr.io/aiservices:latest
CONTAINER_APP_PORT=80
CONTAINER_REGISTRY_SERVER=<CONTAINER_REGISTRY>.azurecr.io
CONTAINER_REGISTRY_IDENTITY=system
CONTAINER_ENVIRONMENT_NAME=env-ai-services
LOGS_WORKSPACE_ID=<LOGS_WORKSPACE_ID>
LOGS_WORKSPACE_KEY=<LOGS_WORKSPACE_KEY>
SUBSCRIPTION_ID=<SUBSCRIPTION_ID>
“clientId”: “00000000-0000-0000-0000-000000000000”,
“clientSecret”: “00000000000000000000000000000000”,
“subscriptionId”: “00000000-0000-0000-0000-000000000000”,
“tenantId”: “00000000-0000-0000-0000-000000000000”,
“activeDirectoryEndpointUrl”: “https://login.microsoftonline.com”,
“resourceManagerEndpointUrl”: “https://management.azure.com/”,
“activeDirectoryGraphResourceId”: “https://graph.windows.net/”,
“sqlManagementEndpointUrl”: “https://management.core.windows.net:8443/”,
“galleryEndpointUrl”: “https://gallery.azure.com/”,
“managementEndpointUrl”: “https://management.core.windows.net/”
}
Set the CONTAINER_REGISTRY variable to the name of the Azure Container Registry.
Set the RESOURCE_GROUP variable for the resource group where you Container registry.
Set the CONTAINER_APP_NAME variable to the name of the Azure Container App.
npm install
npm run dev
./setup.sh
–name $CONTAINER_APP_NAME
–resource-group $RESOURCE_GROUP
–query properties.configuration.ingress.fqdn
Spoken language: Select the language of the speaker.
Translated language: Select the language to which the spoken language will be translated.
Listen: Start the speech-to-text transcription, this will use the Speech to text SDK for JavaScript package.
// intialize the speech recognizer
const speechConfig = speechsdk.SpeechConfig.fromAuthorizationToken(tokenObj.token, tokenObj.region);
const audioConfig = speechsdk.AudioConfig.fromDefaultMicrophoneInput();
recognizer = new speechsdk.SpeechRecognizer(speechConfig, audioConfig);
// register the event handlers
…
// listen and transcribe
recognizer.startContinuousRecognitionAsync();
// stop the speech recognizer
recognizer.stopContinuousRecognitionAsync();
…
const res = await axios.post(`${config.translateEndpoint}translate?api-version=3.0&from=${from}&to=${to}`, data, headers);
return res.data[0].translations[0].text;
const jobId = res.headers[‘operation-location’];
let completed = false
while (!completed) {
res = await axios.get(`${jobId}`, headers);
completed = res.data.tasks.completed > 0;
}
const conv = res.data.tasks.items[0].results.conversations[0].summaries.map(summary => {
return { aspect: summary.aspect, text: summary.text }
});
return conv;
// intialize the speech synthesizer
speechConfig.speechSynthesisVoiceName = speakLanguage;
const synthAudioConfig = speechsdk.AudioConfig.fromDefaultSpeakerOutput();
synthesizer = new speechsdk.SpeechSynthesizer(speechConfig, synthAudioConfig);
…
// speak the text
synthesizer.speakTextAsync(text,
function (result) {
if (result.reason === speechsdk.ResultReason.SynthesizingAudioCompleted) {
console.log(“synthesis finished.”);
} else {
console.error(“Speech synthesis canceled, ” + result.errorDetails +
“nDid you set the speech resource key and region values?”);
}
});
clearMessages = () =>
socket.emit(‘clear’);
syncMessages = () =>
socket.emit(‘sync’);
Container Registry: for the Next.js app container image.
Container App (& Container App Environment): for the Next.js app.
Language Service: for the conversation summarization.
Log Analytics Workspace: for the logs of the container app.
Web PubSub for Socket.IO: for the real-time, duplex communication between the client and the server.
Speech service: for the speech-to-text transcription capabilities.
Translator service: for the translation capabilities.
Create a project and choose a model. Use a Speech resource that you create in the Azure portal. If you train a custom model with audio data, choose a Speech resource region with dedicated hardware for training audio data. For more information, see footnotes in the regions table.
Upload test data. Upload test data to evaluate the speech to text offering for your applications, tools, and products.
Test recognition quality. Use the Speech Studio to play back uploaded audio and inspect the speech recognition quality of your test data.
Test model quantitatively. Evaluate and improve the accuracy of the speech to text model. The Speech service provides a quantitative word error rate (WER), which you can use to determine if more training is required.
Train a model. Provide written transcripts and related text, along with the corresponding audio data. Testing a model before and after training is optional but recommended.
Deploy a model. Once you’re satisfied with the test results, deploy the model to a custom endpoint. Except for batch transcription, you must deploy a custom endpoint to use a custom speech model.
Microsoft Tech Community – Latest Blogs –Read More
Write a string to hdf5 file with defined string length
I am trying to write a string to hdf5 file:
h5create(‘combo.hdf5′,’/description’,1,Datatype=’string’);
h5write(‘combo.hdf5′,’/description’,"this is the description");
When I read it out using h5disp, the result is:
Dataset ‘description’
Size: 1
MaxSize: 1
Datatype: H5T_STRING
String Length: variable
Padding: H5T_STR_NULLTERM
Character Set: H5T_CSET_UTF8
Character Type: H5T_C_S1
ChunkSize: []
Filters: none
FillValue: ”
Notice the String Length is denoted as ‘variable’. What if I want to define the length of this string (23 here), so it shows:
String Length: 23
Thank you very much!I am trying to write a string to hdf5 file:
h5create(‘combo.hdf5′,’/description’,1,Datatype=’string’);
h5write(‘combo.hdf5′,’/description’,"this is the description");
When I read it out using h5disp, the result is:
Dataset ‘description’
Size: 1
MaxSize: 1
Datatype: H5T_STRING
String Length: variable
Padding: H5T_STR_NULLTERM
Character Set: H5T_CSET_UTF8
Character Type: H5T_C_S1
ChunkSize: []
Filters: none
FillValue: ”
Notice the String Length is denoted as ‘variable’. What if I want to define the length of this string (23 here), so it shows:
String Length: 23
Thank you very much! I am trying to write a string to hdf5 file:
h5create(‘combo.hdf5′,’/description’,1,Datatype=’string’);
h5write(‘combo.hdf5′,’/description’,"this is the description");
When I read it out using h5disp, the result is:
Dataset ‘description’
Size: 1
MaxSize: 1
Datatype: H5T_STRING
String Length: variable
Padding: H5T_STR_NULLTERM
Character Set: H5T_CSET_UTF8
Character Type: H5T_C_S1
ChunkSize: []
Filters: none
FillValue: ”
Notice the String Length is denoted as ‘variable’. What if I want to define the length of this string (23 here), so it shows:
String Length: 23
Thank you very much! hdf5, string length, define MATLAB Answers — New Questions
Dynamic Filtering lists – Slow page responses
Has anyone else experienced slow page responses when using the dynamic filtering of two lists? I’m doing this on a modern SharePoint Online page and it is a very slow response. This is an old feature (was available in SharePoint On-prem 2013, so not sure why it is so slow. Any suggestions?
Has anyone else experienced slow page responses when using the dynamic filtering of two lists? I’m doing this on a modern SharePoint Online page and it is a very slow response. This is an old feature (was available in SharePoint On-prem 2013, so not sure why it is so slow. Any suggestions? Read More
error in envelope function
The envelope function always gives me an error when I enter the input ‘peaks’, whatever the data may be. The error that appears is this:
Error using findpeaks
Too many input arguments.
Error in envelope>envPeak (line 181)
[~,iPk] = findpeaks(double(x(:,chan)),’MinPeakDistance’,n);
Error in envelope (line 79)
[yupper, ylower] = envPeak(x,n);
I have looked at three different versions of Matlab and it gives me the error in all three.The envelope function always gives me an error when I enter the input ‘peaks’, whatever the data may be. The error that appears is this:
Error using findpeaks
Too many input arguments.
Error in envelope>envPeak (line 181)
[~,iPk] = findpeaks(double(x(:,chan)),’MinPeakDistance’,n);
Error in envelope (line 79)
[yupper, ylower] = envPeak(x,n);
I have looked at three different versions of Matlab and it gives me the error in all three. The envelope function always gives me an error when I enter the input ‘peaks’, whatever the data may be. The error that appears is this:
Error using findpeaks
Too many input arguments.
Error in envelope>envPeak (line 181)
[~,iPk] = findpeaks(double(x(:,chan)),’MinPeakDistance’,n);
Error in envelope (line 79)
[yupper, ylower] = envPeak(x,n);
I have looked at three different versions of Matlab and it gives me the error in all three. envelope signal MATLAB Answers — New Questions
How to fix Payroll Error Code 40003 QuickBooks Desktop Windows 10?
I encountered Payroll Error Code 40003 on QuickBooks Desktop Windows 10 while processing payroll. Each attempt to resolve it proves unsuccessful. Seeking expert assistance to troubleshoot and resolve this issue promptly.
I encountered Payroll Error Code 40003 on QuickBooks Desktop Windows 10 while processing payroll. Each attempt to resolve it proves unsuccessful. Seeking expert assistance to troubleshoot and resolve this issue promptly. Read More
Data Entry Mode to Edit Mode(?)
We are currently having a database built for our company. When selecting a Form, it opens on a Blank Record, however, when we search for a record and select it, it will open the first record we ever entered into the database and then populate the record we are searching for. Is there a work around for this? We are told it is going from Data Entry mode, to edit mode and that is what is causing the temp record to populate. It is better to be shown in video than a picture, but I have uploaded a picture.
We are currently having a database built for our company. When selecting a Form, it opens on a Blank Record, however, when we search for a record and select it, it will open the first record we ever entered into the database and then populate the record we are searching for. Is there a work around for this? We are told it is going from Data Entry mode, to edit mode and that is what is causing the temp record to populate. It is better to be shown in video than a picture, but I have uploaded a picture. Read More
How to generate C++ code from a *.fis file?
How do I generate C++ code from a *.fis file?How do I generate C++ code from a *.fis file? How do I generate C++ code from a *.fis file? code generation MATLAB Answers — New Questions
Re: Attrition Rate calculation in Excel
Hello! You’ve posted your question in the Tech Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I’m moving your question to the Excel space – please post Excel questions here in the future.
@Vinod_Sir
Hello! You’ve posted your question in the Tech Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I’m moving your question to the Excel space – please post Excel questions here in the future. Read More
Copilot on premise
I promise I searched this community before asking this question 🙂
Is there a way to grant copilot access to on-premise file share data to form it’s model in order to ask questions/prompt? Copilot seems powerful when used against M365 account/Azure tenant data. Is there a way to include on-premise data in this model?
I promise I searched this community before asking this question 🙂 Is there a way to grant copilot access to on-premise file share data to form it’s model in order to ask questions/prompt? Copilot seems powerful when used against M365 account/Azure tenant data. Is there a way to include on-premise data in this model? Read More
ASCII characters in code?
I have a little problem with the display of some characters in my matlab code. The header of data i read from a text file contains special characters, which i need to write down into my code. E.g. one column has the Name "T / °C". Now every time i close and reopen Matlab, the parts in my code are displayd like this: "T / �C". So everyday i have to replace all occurances of this character, and of course it is not the only character. Is there a way to solve this. I did not find any setting in the preferences.
Thank you!I have a little problem with the display of some characters in my matlab code. The header of data i read from a text file contains special characters, which i need to write down into my code. E.g. one column has the Name "T / °C". Now every time i close and reopen Matlab, the parts in my code are displayd like this: "T / �C". So everyday i have to replace all occurances of this character, and of course it is not the only character. Is there a way to solve this. I did not find any setting in the preferences.
Thank you! I have a little problem with the display of some characters in my matlab code. The header of data i read from a text file contains special characters, which i need to write down into my code. E.g. one column has the Name "T / °C". Now every time i close and reopen Matlab, the parts in my code are displayd like this: "T / �C". So everyday i have to replace all occurances of this character, and of course it is not the only character. Is there a way to solve this. I did not find any setting in the preferences.
Thank you! ascii character display MATLAB Answers — New Questions