Month: July 2024
جلب الحبيب العنيد -00973.34028.443 💞رقم شيـخ روحــاني
جلب الحبيب العنيد -00973.34028.443 :revolving_hearts:رقم شيـخ روحــاني
جلب الحبيب العنيد -00973.34028.443 :revolving_hearts:رقم شيـخ روحــاني Read More
Can I add units to the table?
Can I add units to the variables in the table? I have searched for information and I could not find anything, it can only be done in numbers …please helpCan I add units to the variables in the table? I have searched for information and I could not find anything, it can only be done in numbers …please help Can I add units to the variables in the table? I have searched for information and I could not find anything, it can only be done in numbers …please help units, tables, variables MATLAB Answers — New Questions
Creating a Square Matrix from a Variable “Plug-In”, Keeping Each Row In The Matrix Fixed To One Value
Hello everyone,
I am trying to create a square matrix that is N x N in size. In my case, N = 23.
I have a variable that’s called "Kernel". This variable is calculated as an equation in terms of "z" and "z_prime".
My values in z_prime will vary from L / 2N to (2N-1)*(L/2N) , in steps of "L/N".
My "z" variable will be fixed.
My goal is to generate a matrix with my "Kernel" variables that have different values of "z_prime", but keeping "z" fixed as a variable.
However, I need to keep each row of the "Kernel" matrix fixed to one "z_prime" value.
Which means each row will have its own "z_prime" value and thus each row will have its own "Kernel" value.
I attached my "value list" of "z_prime".
See excel sheet attached:
z_prime_value_list.xlsx
I attached a screenshot showing the type of matrix I am trying to generate
See .PNG file attached:
Kernel Matrix.png
…all the way until K(z,z_prime_23).
In my attempt, I have tried to use for loops and creating function handles to make it easier to generate this matrix. However, I still got a "1 x 23" matrix instead of the "23×23" matrix I was trying to get.
I attached my MATLAB Code for reference.
See MATLAB .m file attached:
Square_Matrix.m
I know that there is a way to use "nested" for loops to generate a square matrix of an "N X N" size. However, I wasn’t quite sure on how to implement that in MATLAB for my case.
I have tried to look through different questions/answers on the Mathworks Forum regarding square matrices. However, I wasn’t able to find anything that was relevant to my case.Hello everyone,
I am trying to create a square matrix that is N x N in size. In my case, N = 23.
I have a variable that’s called "Kernel". This variable is calculated as an equation in terms of "z" and "z_prime".
My values in z_prime will vary from L / 2N to (2N-1)*(L/2N) , in steps of "L/N".
My "z" variable will be fixed.
My goal is to generate a matrix with my "Kernel" variables that have different values of "z_prime", but keeping "z" fixed as a variable.
However, I need to keep each row of the "Kernel" matrix fixed to one "z_prime" value.
Which means each row will have its own "z_prime" value and thus each row will have its own "Kernel" value.
I attached my "value list" of "z_prime".
See excel sheet attached:
z_prime_value_list.xlsx
I attached a screenshot showing the type of matrix I am trying to generate
See .PNG file attached:
Kernel Matrix.png
…all the way until K(z,z_prime_23).
In my attempt, I have tried to use for loops and creating function handles to make it easier to generate this matrix. However, I still got a "1 x 23" matrix instead of the "23×23" matrix I was trying to get.
I attached my MATLAB Code for reference.
See MATLAB .m file attached:
Square_Matrix.m
I know that there is a way to use "nested" for loops to generate a square matrix of an "N X N" size. However, I wasn’t quite sure on how to implement that in MATLAB for my case.
I have tried to look through different questions/answers on the Mathworks Forum regarding square matrices. However, I wasn’t able to find anything that was relevant to my case. Hello everyone,
I am trying to create a square matrix that is N x N in size. In my case, N = 23.
I have a variable that’s called "Kernel". This variable is calculated as an equation in terms of "z" and "z_prime".
My values in z_prime will vary from L / 2N to (2N-1)*(L/2N) , in steps of "L/N".
My "z" variable will be fixed.
My goal is to generate a matrix with my "Kernel" variables that have different values of "z_prime", but keeping "z" fixed as a variable.
However, I need to keep each row of the "Kernel" matrix fixed to one "z_prime" value.
Which means each row will have its own "z_prime" value and thus each row will have its own "Kernel" value.
I attached my "value list" of "z_prime".
See excel sheet attached:
z_prime_value_list.xlsx
I attached a screenshot showing the type of matrix I am trying to generate
See .PNG file attached:
Kernel Matrix.png
…all the way until K(z,z_prime_23).
In my attempt, I have tried to use for loops and creating function handles to make it easier to generate this matrix. However, I still got a "1 x 23" matrix instead of the "23×23" matrix I was trying to get.
I attached my MATLAB Code for reference.
See MATLAB .m file attached:
Square_Matrix.m
I know that there is a way to use "nested" for loops to generate a square matrix of an "N X N" size. However, I wasn’t quite sure on how to implement that in MATLAB for my case.
I have tried to look through different questions/answers on the Mathworks Forum regarding square matrices. However, I wasn’t able to find anything that was relevant to my case. matrices, for loop, for loops, nested for loop, nested for loops, function handles MATLAB Answers — New Questions
Identity Governance > Opt-in Preview Features appears to be malfunctioning
I have two distinctly separate goals:
Prevent administrative assignments of DISABLED access package policy(ies). By default, appropriate Entra Role, including built-in catalog roles, are able to administratively assign users to disabled access package policies.Limit administrative assignment of access packages to catalog roles only – prevent getting around catalog roles. (e.g., prevent GA or Identity Governance Administrator).
I have an access package policy that is used only by administrators to assign users to one resource (security) group: Users who can request access: None (administrator direct assignments only).
Regardless of whether we use elevated to GA, IG Admin, etc., hold an appropriate catalog RBAC role, or any combination thereof, enabling (checking) the following Opt-In Preview Feature disables EVERYONE from administratively being able to assign user(s) to an access package. There is no required approval – nothing. If I uncheck the following option, we’re once again able to administratively assign users from any level and any policy that is disabled.
Error: You don’t meet policy requirements to request this entitlement. (Note: I’m unable to locate the associated Correlation ID)
Lastly, I’ve tested the following in multiple tenants and the behavior is 100% the same. I feel like I’m missing something.
Identity Governance > Entitlement Management > Settings > Opt-in Features
Enforce policy scope setting for admin direct assignments
Enabling this feature will prevent global administrators from adding users to a package that are outside the scope of the selected policy. For example, an attempt to add an external user through a policy that is only configured for internal users will be blocked when this setting is enabled.
1. Identify any workflows in which users require access to a package, but there is no policy that includes them within its scope.
2. Create policies that will include these users.
I have two distinctly separate goals:Prevent administrative assignments of DISABLED access package policy(ies). By default, appropriate Entra Role, including built-in catalog roles, are able to administratively assign users to disabled access package policies.Limit administrative assignment of access packages to catalog roles only – prevent getting around catalog roles. (e.g., prevent GA or Identity Governance Administrator).I have an access package policy that is used only by administrators to assign users to one resource (security) group: Users who can request access: None (administrator direct assignments only).Regardless of whether we use elevated to GA, IG Admin, etc., hold an appropriate catalog RBAC role, or any combination thereof, enabling (checking) the following Opt-In Preview Feature disables EVERYONE from administratively being able to assign user(s) to an access package. There is no required approval – nothing. If I uncheck the following option, we’re once again able to administratively assign users from any level and any policy that is disabled. Error: You don’t meet policy requirements to request this entitlement. (Note: I’m unable to locate the associated Correlation ID)Lastly, I’ve tested the following in multiple tenants and the behavior is 100% the same. I feel like I’m missing something. Identity Governance > Entitlement Management > Settings > Opt-in FeaturesEnforce policy scope setting for admin direct assignmentsEnabling this feature will prevent global administrators from adding users to a package that are outside the scope of the selected policy. For example, an attempt to add an external user through a policy that is only configured for internal users will be blocked when this setting is enabled.1. Identify any workflows in which users require access to a package, but there is no policy that includes them within its scope.2. Create policies that will include these users. Read More
Real time NI-DAQ data plot in Matlab with animatedline.
I tested this code and it works, but I would like to change it so that the time in seconds appears on the x-axis and not datetime. More precisely, I want to set the time limits of the x-axis to be between 0 and 10 seconds and then stop aquisition, so that I can display the signal from ni daq usb 6001. I also want that at the end of the acquisition, the entire signal remains displayed in the graph. Please, if possible, answer me.
As the code shows, I can read the data, live, but at the end of the 10 seconds the graph disappears, but I want it not to disappear. Once again, I want the x-axis to display the time in seconds and to remain stable (axis does not move, only the signal).
clear
close all
time = 0;
data = 0;
`% Set up the plot`
figure(1)
plotGraph = plot(time,data,’-r’ );
title(‘DAQ data log’,’FontSize’,15);
xlabel (‘Elapsed Time (s)’,’FontSize’,10)
ylabel(‘Voltage (V)’,’FontSize’,10);
h = animatedline;
ax = gca;
ax.YGrid = ‘on’;
ax.XGrid = ‘on’;
% Set up the data acquisition
dq = daq("ni");
ch1 = addinput(dq, "Dev1", "ai0", "Voltage");
dq.Rate = 1000;
% Start the data acquisition
start(dq, "Duration", seconds(10))
n = ceil(dq.Rate/10);
while ishandle(plotGraph)
data = read(dq, n);
voltage = data.Dev1_ai0;
t = datetime(‘now’);
for i = 1:100
% Add points to animated line
if isvalid(h)
addpoints(h, datenum(t), voltage(i))
end
end
% Update axes
ax.XLim = datenum([t-seconds(15) t]);
datetick(‘x’,’keeplimits’)
drawnow
end
disp(‘Plot Closed’)I tested this code and it works, but I would like to change it so that the time in seconds appears on the x-axis and not datetime. More precisely, I want to set the time limits of the x-axis to be between 0 and 10 seconds and then stop aquisition, so that I can display the signal from ni daq usb 6001. I also want that at the end of the acquisition, the entire signal remains displayed in the graph. Please, if possible, answer me.
As the code shows, I can read the data, live, but at the end of the 10 seconds the graph disappears, but I want it not to disappear. Once again, I want the x-axis to display the time in seconds and to remain stable (axis does not move, only the signal).
clear
close all
time = 0;
data = 0;
`% Set up the plot`
figure(1)
plotGraph = plot(time,data,’-r’ );
title(‘DAQ data log’,’FontSize’,15);
xlabel (‘Elapsed Time (s)’,’FontSize’,10)
ylabel(‘Voltage (V)’,’FontSize’,10);
h = animatedline;
ax = gca;
ax.YGrid = ‘on’;
ax.XGrid = ‘on’;
% Set up the data acquisition
dq = daq("ni");
ch1 = addinput(dq, "Dev1", "ai0", "Voltage");
dq.Rate = 1000;
% Start the data acquisition
start(dq, "Duration", seconds(10))
n = ceil(dq.Rate/10);
while ishandle(plotGraph)
data = read(dq, n);
voltage = data.Dev1_ai0;
t = datetime(‘now’);
for i = 1:100
% Add points to animated line
if isvalid(h)
addpoints(h, datenum(t), voltage(i))
end
end
% Update axes
ax.XLim = datenum([t-seconds(15) t]);
datetick(‘x’,’keeplimits’)
drawnow
end
disp(‘Plot Closed’) I tested this code and it works, but I would like to change it so that the time in seconds appears on the x-axis and not datetime. More precisely, I want to set the time limits of the x-axis to be between 0 and 10 seconds and then stop aquisition, so that I can display the signal from ni daq usb 6001. I also want that at the end of the acquisition, the entire signal remains displayed in the graph. Please, if possible, answer me.
As the code shows, I can read the data, live, but at the end of the 10 seconds the graph disappears, but I want it not to disappear. Once again, I want the x-axis to display the time in seconds and to remain stable (axis does not move, only the signal).
clear
close all
time = 0;
data = 0;
`% Set up the plot`
figure(1)
plotGraph = plot(time,data,’-r’ );
title(‘DAQ data log’,’FontSize’,15);
xlabel (‘Elapsed Time (s)’,’FontSize’,10)
ylabel(‘Voltage (V)’,’FontSize’,10);
h = animatedline;
ax = gca;
ax.YGrid = ‘on’;
ax.XGrid = ‘on’;
% Set up the data acquisition
dq = daq("ni");
ch1 = addinput(dq, "Dev1", "ai0", "Voltage");
dq.Rate = 1000;
% Start the data acquisition
start(dq, "Duration", seconds(10))
n = ceil(dq.Rate/10);
while ishandle(plotGraph)
data = read(dq, n);
voltage = data.Dev1_ai0;
t = datetime(‘now’);
for i = 1:100
% Add points to animated line
if isvalid(h)
addpoints(h, datenum(t), voltage(i))
end
end
% Update axes
ax.XLim = datenum([t-seconds(15) t]);
datetick(‘x’,’keeplimits’)
drawnow
end
disp(‘Plot Closed’) real-time-data, ni-usb-6001 MATLAB Answers — New Questions
To discribe Lmi term-regarding
Hai Team,
I am NARENSHAKTHI T. Recently working related to LMI tool box. Usually I used to represent the term as lmiterm([lmi 1 1 O1],-2,1), where O1 is a matrix. If I want to add an element’s inverse term as lmiterm([lmi 1 1 inv(O1)],-2,1), But it gives error. so i want your guidance team.
Thanks in adavanceHai Team,
I am NARENSHAKTHI T. Recently working related to LMI tool box. Usually I used to represent the term as lmiterm([lmi 1 1 O1],-2,1), where O1 is a matrix. If I want to add an element’s inverse term as lmiterm([lmi 1 1 inv(O1)],-2,1), But it gives error. so i want your guidance team.
Thanks in adavance Hai Team,
I am NARENSHAKTHI T. Recently working related to LMI tool box. Usually I used to represent the term as lmiterm([lmi 1 1 O1],-2,1), where O1 is a matrix. If I want to add an element’s inverse term as lmiterm([lmi 1 1 inv(O1)],-2,1), But it gives error. so i want your guidance team.
Thanks in adavance lmi term MATLAB Answers — New Questions
How to pull out data from cell array, concatenate it, and put into table for varying trials
Hello there, I have data from 10 trials stored in a 1×10 cell array "Predictors" and I want to create a loop that pulls out one trial at a time and then concatonates the data in all the other trials and saves it under a unique or numbered variable name? I am thinking something like this. I am not sure how to have it number each iteration:
for i = 1:length(Predictors)
Test_i = Predictors(i)
trainindicies_i = setdiff(1:length(Predictors),i);
Train_i = Predictors(trainindicies)
TrainX_i = vertcat(Train_i{:})
endHello there, I have data from 10 trials stored in a 1×10 cell array "Predictors" and I want to create a loop that pulls out one trial at a time and then concatonates the data in all the other trials and saves it under a unique or numbered variable name? I am thinking something like this. I am not sure how to have it number each iteration:
for i = 1:length(Predictors)
Test_i = Predictors(i)
trainindicies_i = setdiff(1:length(Predictors),i);
Train_i = Predictors(trainindicies)
TrainX_i = vertcat(Train_i{:})
end Hello there, I have data from 10 trials stored in a 1×10 cell array "Predictors" and I want to create a loop that pulls out one trial at a time and then concatonates the data in all the other trials and saves it under a unique or numbered variable name? I am thinking something like this. I am not sure how to have it number each iteration:
for i = 1:length(Predictors)
Test_i = Predictors(i)
trainindicies_i = setdiff(1:length(Predictors),i);
Train_i = Predictors(trainindicies)
TrainX_i = vertcat(Train_i{:})
end concatonate, tables, data formatting MATLAB Answers — New Questions
how to plot function with 2 variables? using fsolve or bisection ?
Y=(M_1-M_2^2)*Y^3+ 2X^2 (chi(1-M_1^2)- M_1*M_2)(chi*Y^2(1-M_2^2)+(2M_1+M_2)^Y-2chi*X^2+1=0
where
M_1-M_2=0.1
chi=0.5
X>0Y=(M_1-M_2^2)*Y^3+ 2X^2 (chi(1-M_1^2)- M_1*M_2)(chi*Y^2(1-M_2^2)+(2M_1+M_2)^Y-2chi*X^2+1=0
where
M_1-M_2=0.1
chi=0.5
X>0 Y=(M_1-M_2^2)*Y^3+ 2X^2 (chi(1-M_1^2)- M_1*M_2)(chi*Y^2(1-M_2^2)+(2M_1+M_2)^Y-2chi*X^2+1=0
where
M_1-M_2=0.1
chi=0.5
X>0 select tags from the drop down list MATLAB Answers — New Questions
File submit failed for malware analysis.
I have an English learning software that was recently alerted by Microsoft Defender as potential malware.
When I submit it to Microsoft for analysis as requested. The submitted file is in zip and rar format with password set to “infected”.
I have submitted 8 times, using 7zip, bandzip, rar software package, password is in accordance with the requirements. But each time the analyst replied, “Submitted file password is non-standard, please submit a file with password ‘infected'”
I have an English learning software that was recently alerted by Microsoft Defender as potential malware.When I submit it to Microsoft for analysis as requested. The submitted file is in zip and rar format with password set to “infected”.I have submitted 8 times, using 7zip, bandzip, rar software package, password is in accordance with the requirements. But each time the analyst replied, “Submitted file password is non-standard, please submit a file with password ‘infected'” Read More
URL suggestions randomly disappearing
This bug has been happening for probably a month or two.
Randomly once or twice a week, the address bar would stop showing any URL suggestions when I’m typing.
Regardless of what I type, it just doesn’t show anything. A simple restart fixes it, but clearly this is a bug.
This bug has been happening for probably a month or two.Randomly once or twice a week, the address bar would stop showing any URL suggestions when I’m typing. Regardless of what I type, it just doesn’t show anything. A simple restart fixes it, but clearly this is a bug. Read More
Face Difficulty when converting tensorflow model to Matlab
I have a part of tensorflow code that I need to translate to matlab, but fail to do that. I have checked deep learning toolbox and unable to resolve the issue. If someone can help me this question, it is very helpful.
My tensorflow code (Python) is the following:
def get_r(model,tw,xw,a_data_n,mean_a,mean_u,kP,dim1,dim2,w1,stdt,stdx):
% A tf.GradientTape is used to compute derivatives in TensorFlow
with tf.GradientTape(persistent=True) as tape: % This makes you record the gradients on the tape for the parameters defined
tape.watch(tw) % This is needed to ‘follow’ the time, for automatic differentiation with respect to time
tape.watch(xw) % This is needed to ‘follow’ the position, for automatic differentiation with respect to position
a,u,p = model.net_u(tw,xw)
Px = tape.gradient(p, xw)
At = tape.gradient(a, tw)
ux = tape.gradient(u, xw)
ut = tape.gradient(u, tw)
My Matlab Code is the following: (notice that model.net_u input cannot accept dlarray format, dlarrya has to be done after model.net_u fucntion)
function get_r(model, tw, xw, a_data_n, mean_a, mean_u, kP, dim1, dim2, w1, stdt, stdx)
% Compute derivatives using the MATLAB automatic differentiation functionality
% Run the model
[a, u, p] = model.net_u(tw, xw);
a = dlarray(a);
tw = dlarray(tw);
xw = dlarray(xw);
% Compute gradients by iterating over each element
At = dlgradient(a, tw);
Px = dlgradient(p, xw);
ux = dlgradient(u, xw);
ut = dlgradient(u, tw);
end
Also, my a, u, p variable all have the shape 39600 * 1
My error message is
Error using dlarray/dlgradient (line 105)
Value to differentiate is not traced. It must be a traced real dlarray scalar. Use dlgradient inside a function called by dlfeval to
trace the variables.
Error in get_r (line 12)
At = dlgradient(sum(a, ‘all’), tw);
Can anyone point out how can I improve the code by adding dlfeval and other codes as well.
Additionally, sometimes when I add dlfeval, it will create the following error. What does this error mean?
Error using deep.internal.dlfevalWithNestingCheck (line 14)
Nested dlfeval calls are not supported. To compute higher derivatives, set the ‘EnableHigherDerivatives’ option of the dlgradient
function to true.
Error in dlfeval (line 31)
[varargout{1:nargout}] = deep.internal.dlfevalWithNestingCheck(fun,varargin{:});
Thanks for all suggestions!I have a part of tensorflow code that I need to translate to matlab, but fail to do that. I have checked deep learning toolbox and unable to resolve the issue. If someone can help me this question, it is very helpful.
My tensorflow code (Python) is the following:
def get_r(model,tw,xw,a_data_n,mean_a,mean_u,kP,dim1,dim2,w1,stdt,stdx):
% A tf.GradientTape is used to compute derivatives in TensorFlow
with tf.GradientTape(persistent=True) as tape: % This makes you record the gradients on the tape for the parameters defined
tape.watch(tw) % This is needed to ‘follow’ the time, for automatic differentiation with respect to time
tape.watch(xw) % This is needed to ‘follow’ the position, for automatic differentiation with respect to position
a,u,p = model.net_u(tw,xw)
Px = tape.gradient(p, xw)
At = tape.gradient(a, tw)
ux = tape.gradient(u, xw)
ut = tape.gradient(u, tw)
My Matlab Code is the following: (notice that model.net_u input cannot accept dlarray format, dlarrya has to be done after model.net_u fucntion)
function get_r(model, tw, xw, a_data_n, mean_a, mean_u, kP, dim1, dim2, w1, stdt, stdx)
% Compute derivatives using the MATLAB automatic differentiation functionality
% Run the model
[a, u, p] = model.net_u(tw, xw);
a = dlarray(a);
tw = dlarray(tw);
xw = dlarray(xw);
% Compute gradients by iterating over each element
At = dlgradient(a, tw);
Px = dlgradient(p, xw);
ux = dlgradient(u, xw);
ut = dlgradient(u, tw);
end
Also, my a, u, p variable all have the shape 39600 * 1
My error message is
Error using dlarray/dlgradient (line 105)
Value to differentiate is not traced. It must be a traced real dlarray scalar. Use dlgradient inside a function called by dlfeval to
trace the variables.
Error in get_r (line 12)
At = dlgradient(sum(a, ‘all’), tw);
Can anyone point out how can I improve the code by adding dlfeval and other codes as well.
Additionally, sometimes when I add dlfeval, it will create the following error. What does this error mean?
Error using deep.internal.dlfevalWithNestingCheck (line 14)
Nested dlfeval calls are not supported. To compute higher derivatives, set the ‘EnableHigherDerivatives’ option of the dlgradient
function to true.
Error in dlfeval (line 31)
[varargout{1:nargout}] = deep.internal.dlfevalWithNestingCheck(fun,varargin{:});
Thanks for all suggestions! I have a part of tensorflow code that I need to translate to matlab, but fail to do that. I have checked deep learning toolbox and unable to resolve the issue. If someone can help me this question, it is very helpful.
My tensorflow code (Python) is the following:
def get_r(model,tw,xw,a_data_n,mean_a,mean_u,kP,dim1,dim2,w1,stdt,stdx):
% A tf.GradientTape is used to compute derivatives in TensorFlow
with tf.GradientTape(persistent=True) as tape: % This makes you record the gradients on the tape for the parameters defined
tape.watch(tw) % This is needed to ‘follow’ the time, for automatic differentiation with respect to time
tape.watch(xw) % This is needed to ‘follow’ the position, for automatic differentiation with respect to position
a,u,p = model.net_u(tw,xw)
Px = tape.gradient(p, xw)
At = tape.gradient(a, tw)
ux = tape.gradient(u, xw)
ut = tape.gradient(u, tw)
My Matlab Code is the following: (notice that model.net_u input cannot accept dlarray format, dlarrya has to be done after model.net_u fucntion)
function get_r(model, tw, xw, a_data_n, mean_a, mean_u, kP, dim1, dim2, w1, stdt, stdx)
% Compute derivatives using the MATLAB automatic differentiation functionality
% Run the model
[a, u, p] = model.net_u(tw, xw);
a = dlarray(a);
tw = dlarray(tw);
xw = dlarray(xw);
% Compute gradients by iterating over each element
At = dlgradient(a, tw);
Px = dlgradient(p, xw);
ux = dlgradient(u, xw);
ut = dlgradient(u, tw);
end
Also, my a, u, p variable all have the shape 39600 * 1
My error message is
Error using dlarray/dlgradient (line 105)
Value to differentiate is not traced. It must be a traced real dlarray scalar. Use dlgradient inside a function called by dlfeval to
trace the variables.
Error in get_r (line 12)
At = dlgradient(sum(a, ‘all’), tw);
Can anyone point out how can I improve the code by adding dlfeval and other codes as well.
Additionally, sometimes when I add dlfeval, it will create the following error. What does this error mean?
Error using deep.internal.dlfevalWithNestingCheck (line 14)
Nested dlfeval calls are not supported. To compute higher derivatives, set the ‘EnableHigherDerivatives’ option of the dlgradient
function to true.
Error in dlfeval (line 31)
[varargout{1:nargout}] = deep.internal.dlfevalWithNestingCheck(fun,varargin{:});
Thanks for all suggestions! deep learning MATLAB Answers — New Questions
Deploy Dynamic Routing (BGP) between Azure VPN and Third-Party Firewall (Palo Alto)
This blog explains how to deploy dynamic routing (BGP) between Azure VPN and a third-party firewall. You can refer to this topology and deployment guide in scenarios where you need VPN connectivity between an on-premises third-party VPN device and Azure VPN, or any cloud environment.
Why BGP?
BGP is the standard routing protocol commonly used in the Internet to exchange routing and reachability information between two or more networks. When used in the context of Azure Virtual Networks, BGP enables the Azure VPN gateways and your on-premises VPN devices, called BGP peers or neighbors, to exchange “routes” that will inform both gateways on the availability and reachability for those prefixes to go through the gateways or routers involved. BGP can also enable transit routing among multiple networks by propagating routes a BGP gateway learns from one BGP peer to all other BGP peers.
Diagram Pre-Requisite
Firewall Network: Firewall with three interfaces (Public, Private, Management). Here, the LAB has configured with VM-series Palo Alto firewall.
Azure VPN Network: Test VM, Gateway Subnet
Test Network Connected to Firewall Network: Azure VM with UDR pointing to Firewall’s Internal Interface. The test network should be peered with firewall network.
Configuration
Part 1: Configure Azure VPN with BGP enabled
Create Virtual Network Gateway with below specification
Provide Name, Gateway type (VPN), VPN SKU, VNet (with dedicated Gateway Subnet), Public IP
Enable BGP and provide AS number
Create
Note: Azure will auto provision a local BGP peer with an IP address from Gateway Subnet. After deployment the configuration will look similar to below. Make a note of Public IP and Peer IP generated, we need this while configuring VPN at remote end
Create Local Network Gateway
Local Network Gateway represents the firewall VPN network Configuration where you should provide remote configuration parameters.
Provide Name, Remote peer Public IP
In the Address space specify remote BGP peer IP (Router ID in case of Palo Alto).
Please note that if you are configuring static route instead of dynamic you should advertise entire remote network ranges which you want to communicate through VPN. Here BGP making this process much simpler.
In Advanced tab enable BGP and provide remote ASN Number and BGP peer IP
create
Create Connections with default crypto profile
Once the VPN Gateway and Local Network Gateway has provisioned you can build connection which represents IPsec and IKE configurations.
Go to VPN GW and under Settings, Add Connection
Provide Name, VPN Gateway, Local Network Gateway, Pre-Shared Key
Enable BGP
If Required Modify IPsec and IKE Crypto setting, Else leave it as default
Create
Completed the Azure end configuration, now we can move to firewall side.
Part 2: Configure Palo Alto Firewall VPN with BGP enabled
Create IKE Gateway with default IKE Crypto profile
Provide Ike Version, Local VPN Interface, Peer IP, Pre-shared key
Create IPSec Tunnel with default IPsec Crypto profile
Create Tunnel Interface
Create IPsec Tunnel: Provide tunnel Interface, IPsec Crypto profile, IKE Gateway
By this configuration your tunnel should be UP
Now finish the remaining BGP Configurations
Configure a Loopback interface to represent BGP router, we have provided 10.0.17.5 IP for the interface.
Configure virtual router Redistribution Profile
Configure Redistribution Profile as below, this configuration ensures what kind of routers needed to be redistributed to BGP peer routers
Enable BGP and configure local BGP and peer BGP parameters
Provide Router ID, AS number
Make user to enable Install Route Option
Configure EBGP Peer Group and Peer with Local BGP Peer IP, Remote (Azure)BGP Peer IP and Remote (Azure) BGP ASN Number.
Also Specify Redistribution profile, also make sure to enable Allow Redistribute Default Route, if you need to propagate default route to BGP peer router
Create Static route for Azure BGP peer
Commit changes
Test Results
Now we can test the connectivity, I have already configured necessary NAT and default route in Firewall. You can see the propagated route in both azure VPN gateway and Palo Alto firewall.
FW NAT
Name
Src
Zone
Dst
Zone
Dst
I/F
Dst
Addr
Service
Translated Packet Source Translation
Translated Packet Destination Translation
nattovm1
any
Untrust
any
untrust_int_ip
3389
none
destination-translation;address: vm1
nattovm2
any
Untrust
any
untrust_int_ip
3000
none
destination-translation;address: vm2;port: 3389
natto internet
any
Untrust
ethernet1/1
default
0.0.0.0/0
dynamic-ip-and-port;ethernet1/1
none
Stattic Route configured:
Azure VPN GW Connection Status and Propagated routes
Azure Test VM1 (10.0.0.4) Effective routes
Palo Alto BGP Summary
Palo Alto BGP connection status
Palo Alto BGP Received Route
Palo Alto BGP Propagated Route
Final Forwarding table
Ping and trace result from Test VM1 to test VM2
Conclusion:
BGP simplifies the route advertisement process. There are lot more configuration options that we can try in BGP to smooth functioning of routing. BGP also enables automatic redundancy and high Availability. Hence it is always recommended to configure BGP when it comes to production grade complex networking.
This blog explains how to deploy dynamic routing (BGP) between Azure VPN and a third-party firewall. You can refer to this topology and deployment guide in scenarios where you need VPN connectivity between an on-premises third-party VPN device and Azure VPN, or any cloud environment.
Why BGP?
BGP is the standard routing protocol commonly used in the Internet to exchange routing and reachability information between two or more networks. When used in the context of Azure Virtual Networks, BGP enables the Azure VPN gateways and your on-premises VPN devices, called BGP peers or neighbors, to exchange “routes” that will inform both gateways on the availability and reachability for those prefixes to go through the gateways or routers involved. BGP can also enable transit routing among multiple networks by propagating routes a BGP gateway learns from one BGP peer to all other BGP peers.
Diagram Diagram:BGP Between Azure VPN and Third-Party FirewallPre-Requisite
Firewall Network: Firewall with three interfaces (Public, Private, Management). Here, the LAB has configured with VM-series Palo Alto firewall.
Azure VPN Network: Test VM, Gateway Subnet
Test Network Connected to Firewall Network: Azure VM with UDR pointing to Firewall’s Internal Interface. The test network should be peered with firewall network.
Configuration
Part 1: Configure Azure VPN with BGP enabled
Create Virtual Network Gateway with below specification
Provide Name, Gateway type (VPN), VPN SKU, VNet (with dedicated Gateway Subnet), Public IP
Enable BGP and provide AS number
Create
Note: Azure will auto provision a local BGP peer with an IP address from Gateway Subnet. After deployment the configuration will look similar to below. Make a note of Public IP and Peer IP generated, we need this while configuring VPN at remote end
Create Local Network Gateway
Local Network Gateway represents the firewall VPN network Configuration where you should provide remote configuration parameters.
Provide Name, Remote peer Public IP
In the Address space specify remote BGP peer IP (Router ID in case of Palo Alto).
Please note that if you are configuring static route instead of dynamic you should advertise entire remote network ranges which you want to communicate through VPN. Here BGP making this process much simpler.
In Advanced tab enable BGP and provide remote ASN Number and BGP peer IP
create
Create Connections with default crypto profile
Once the VPN Gateway and Local Network Gateway has provisioned you can build connection which represents IPsec and IKE configurations.
Go to VPN GW and under Settings, Add Connection
Provide Name, VPN Gateway, Local Network Gateway, Pre-Shared Key
Enable BGP
If Required Modify IPsec and IKE Crypto setting, Else leave it as default
Create
Completed the Azure end configuration, now we can move to firewall side.
Part 2: Configure Palo Alto Firewall VPN with BGP enabled
Create IKE Gateway with default IKE Crypto profile
Provide Ike Version, Local VPN Interface, Peer IP, Pre-shared key
Create IPSec Tunnel with default IPsec Crypto profile
Create Tunnel Interface
Create IPsec Tunnel: Provide tunnel Interface, IPsec Crypto profile, IKE Gateway
By this configuration your tunnel should be UP
Now finish the remaining BGP Configurations
Configure a Loopback interface to represent BGP router, we have provided 10.0.17.5 IP for the interface.
Configure virtual router Redistribution Profile
Configure Redistribution Profile as below, this configuration ensures what kind of routers needed to be redistributed to BGP peer routers
Enable BGP and configure local BGP and peer BGP parameters
Provide Router ID, AS number
Make user to enable Install Route Option
Configure EBGP Peer Group and Peer with Local BGP Peer IP, Remote (Azure)BGP Peer IP and Remote (Azure) BGP ASN Number.
Also Specify Redistribution profile, also make sure to enable Allow Redistribute Default Route, if you need to propagate default route to BGP peer router
Create Static route for Azure BGP peer
Commit changes
Test Results
Now we can test the connectivity, I have already configured necessary NAT and default route in Firewall. You can see the propagated route in both azure VPN gateway and Palo Alto firewall.
FW NAT
Name
Src Zone
DstZone
DstI/F
DstAddr
Service
Translated Packet Source Translation
Translated Packet Destination Translation
nattovm1
any
Untrust
any
untrust_int_ip
3389
none
destination-translation;address: vm1
nattovm2
any
Untrust
any
untrust_int_ip
3000
none
destination-translation;address: vm2;port: 3389
natto internet
any
Untrust
ethernet1/1
default
0.0.0.0/0
dynamic-ip-and-port;ethernet1/1
none
Stattic Route configured:
Azure VPN GW Connection Status and Propagated routes
Azure Test VM1 (10.0.0.4) Effective routes
Palo Alto BGP Summary
Palo Alto BGP connection status
Palo Alto BGP Received Route
Palo Alto BGP Propagated Route
Final Forwarding table
Ping and trace result from Test VM1 to test VM2
Conclusion:
BGP simplifies the route advertisement process. There are lot more configuration options that we can try in BGP to smooth functioning of routing. BGP also enables automatic redundancy and high Availability. Hence it is always recommended to configure BGP when it comes to production grade complex networking.
Read More
Error message using SPM command spm_jobman
Hi everyone,
I try to run an adapted preprocessing script (got it from an collegue) for a fMRI analysis. Unfortunatelly, I’m stuck on the command spm_jobman and get the following error message:
Error using spm_jobman>fill_run_job
No executable modules, but still unresolved dependencies or incomplete module inputs.
Error in spm_jobman (line 247)
sts = fill_run_job(‘run’, cjob, varargin{3:end});
Error in s03_preprocessing_with_slice_timing_batch_NICCUE (line 79)
spm_jobman(‘run’, matlabbatch);
It would be really helpful, if somebody could tell me what the problem is.
Thank you very much!
FranziskaHi everyone,
I try to run an adapted preprocessing script (got it from an collegue) for a fMRI analysis. Unfortunatelly, I’m stuck on the command spm_jobman and get the following error message:
Error using spm_jobman>fill_run_job
No executable modules, but still unresolved dependencies or incomplete module inputs.
Error in spm_jobman (line 247)
sts = fill_run_job(‘run’, cjob, varargin{3:end});
Error in s03_preprocessing_with_slice_timing_batch_NICCUE (line 79)
spm_jobman(‘run’, matlabbatch);
It would be really helpful, if somebody could tell me what the problem is.
Thank you very much!
Franziska Hi everyone,
I try to run an adapted preprocessing script (got it from an collegue) for a fMRI analysis. Unfortunatelly, I’m stuck on the command spm_jobman and get the following error message:
Error using spm_jobman>fill_run_job
No executable modules, but still unresolved dependencies or incomplete module inputs.
Error in spm_jobman (line 247)
sts = fill_run_job(‘run’, cjob, varargin{3:end});
Error in s03_preprocessing_with_slice_timing_batch_NICCUE (line 79)
spm_jobman(‘run’, matlabbatch);
It would be really helpful, if somebody could tell me what the problem is.
Thank you very much!
Franziska spm spm_jobman fmri MATLAB Answers — New Questions
Combine Google Authentication & JWT Tokens using Cookie Authorization
* Edit: project is only a web-api, front-end will be developed in react(next.js)
Hi guys!
I’m a TypeScript Fullstack developer and I’m new to .NET and ASP.NET and basically this is one of my first projects using C# and .NET.
My project’s architecture requires a kind of different than out-of-the-box way of identifying users.
I want Google Authentication which will create a local account (which I can relate other entities to)
And JWT Tokens (access, refresh) generated and sent as cookies to the client and each protected endpoint to be using these cookies to authorize the requesting user.
I haven’t figured out a way of implementing this and still using mostly OOTB tools in order to keep modifications little as possible.
Any tips and tricks on how to implement it?
* Edit2:
Just to be clear, I know how to create endpoints, and protected endpoints using the built in identity framework, using roles, etc… Its this combination of Google Auth, generating tokens, sending them to client as cookies basically is where my difficulty relies.
* I have almost a blank new project, already set up with only google credentials
* Edit: project is only a web-api, front-end will be developed in react(next.js) Hi guys! I’m a TypeScript Fullstack developer and I’m new to .NET and ASP.NET and basically this is one of my first projects using C# and .NET. My project’s architecture requires a kind of different than out-of-the-box way of identifying users.I want Google Authentication which will create a local account (which I can relate other entities to)And JWT Tokens (access, refresh) generated and sent as cookies to the client and each protected endpoint to be using these cookies to authorize the requesting user. I haven’t figured out a way of implementing this and still using mostly OOTB tools in order to keep modifications little as possible. Any tips and tricks on how to implement it? * Edit2: Just to be clear, I know how to create endpoints, and protected endpoints using the built in identity framework, using roles, etc… Its this combination of Google Auth, generating tokens, sending them to client as cookies basically is where my difficulty relies. * I have almost a blank new project, already set up with only google credentials Read More
Lenovo Thinkpad keeps getting stuck in boot error
I have a Lenovo ThinkPad and recently it got stuck in a boot loop. After setting the Secure Boot option to “Enabled” my laptop worked fine, but every time I put it to sleep/hibernate mode it gets into the loop again. This is getting really annoying (because the Secure Boot option, for some reason doesn’t work unless my battery drops to 0% and then I do the whole process again) and inconvenient. Is there a solution to this?
I have a Lenovo ThinkPad and recently it got stuck in a boot loop. After setting the Secure Boot option to “Enabled” my laptop worked fine, but every time I put it to sleep/hibernate mode it gets into the loop again. This is getting really annoying (because the Secure Boot option, for some reason doesn’t work unless my battery drops to 0% and then I do the whole process again) and inconvenient. Is there a solution to this? Read More
how to modify this code to estimate LCOE using the parameters for offshore wind?
CAPEX ESTIMATION (KUSD)
% CAPEX OF WIND TURBINE
USD = 1000; Pwt = 400; dp = 30; Nwt = 50; Lcc = 10620; Acc = 6691; Loffs = 10; Lonsh = 2;
CAPwt = 1497.9 * Pwt^0.87; T = 20; WACC = 0.10;
% CAPEX OF BUILDING
CAbui = (0.9181 * dp^2 – 31.43 * dp + 747.4) * 1.09 * Pwt;
% CAPEX OF PROJECT MANAGEMENT
CApm = 130.82 * Pwt;
% CAPEX OF SUPERVISORY CONTROL AND DATA ACQUISITION
CAscda = 555.1 * Nwt;
% CAPEX OF ACQUISITION OF WIND POWER CONNECTION CABLES
CAawpc = ((4.26 * 10^-4 * Acc) + (2.324 * 10^-1)) * 1.09 * Lcc;
% INSTALLATION OF WIND POWER CONNECTION CABLES
CAiwpc = ((-2.2684 * 10^-3 * Nwt) + (3.8018 * 10^-1)) * 1.09 * Lcc;
% ACQUISITION OF OFFSHORE TRANSMISSION CABLES
CAaotc = ((3.3565 * 10^-3 * Pwt) + (8.3872 * 10^-2)) * Loffs * 1.09;
% CAPEX OF INSTALLATION OF OFFSHORE TRANSMISSION CABLES
CAiotc = ((-6.318 * 10^-4 * Pwt) + (3.8125 * 10^-1)) * 1.09 * Loffs;
% CAPEX OF ACQUISITION OF ONSHORE TRANSMISSION CABLES
CAaontc = ((-3.3565 * 10^-3 * Pwt) + (8.3872 * 10^-2)) * 0.27 * Lonsh;
% CAPEX OF INSTALLATION OF ONSHORE TRANSMISSION CABLES
CAiontc = 0.578 * Lonsh;
% Total CAPEX
CApexT = (CAPwt + CAbui + CApm + CAscda + CAawpc + CAiwpc + CAaotc + CAiotc + CAaontc + CAiontc);
CAXNEW = CApexT – 0.2 * CApexT;
% OPEX
Dexex = 0.003 * CApexT;
% TOTAL CAPEX IN NAIRA
CApexTN = CApexT * USD * 10^3;
% TOTAL OPEX AND DEXEX IN NAIRA
DexexN = Dexex * USD * 10^3;
Opex = 0.035 * CApexT;
OpexN = Opex * USD * 10^3;
n = 20; Rb = 10; AEPv = 28298304; Civ = 668860000; Cdex = 2006600; Cpex = 23410000;
% Calculate LCOE
AEP = 28298304;
lcoe = calculate_lcoe(CAXNEW, Opex, WACC, AEP, T);
% Display the LCOE
disp([‘The LCOE is ‘, num2str(lcoe), ‘ currency units per kWh’]);
% Function definition
function lcoe = calculate_lcoe(CAXNEW, Opex, WACC, AEP, T)
% Calculate the numerator of the LCOE formula
numerator = CAXNEW;
for t = 1:T
numerator = numerator + Opex / (1 + WACC)^t;
end
% Calculate the denominator of the LCOE formula
denominator = 0;
for t = 1:T
denominator = denominator + AEP / (1 + WACC)^t;
end
% Calculate the LCOE
lcoe = numerator / denominator;
endCAPEX ESTIMATION (KUSD)
% CAPEX OF WIND TURBINE
USD = 1000; Pwt = 400; dp = 30; Nwt = 50; Lcc = 10620; Acc = 6691; Loffs = 10; Lonsh = 2;
CAPwt = 1497.9 * Pwt^0.87; T = 20; WACC = 0.10;
% CAPEX OF BUILDING
CAbui = (0.9181 * dp^2 – 31.43 * dp + 747.4) * 1.09 * Pwt;
% CAPEX OF PROJECT MANAGEMENT
CApm = 130.82 * Pwt;
% CAPEX OF SUPERVISORY CONTROL AND DATA ACQUISITION
CAscda = 555.1 * Nwt;
% CAPEX OF ACQUISITION OF WIND POWER CONNECTION CABLES
CAawpc = ((4.26 * 10^-4 * Acc) + (2.324 * 10^-1)) * 1.09 * Lcc;
% INSTALLATION OF WIND POWER CONNECTION CABLES
CAiwpc = ((-2.2684 * 10^-3 * Nwt) + (3.8018 * 10^-1)) * 1.09 * Lcc;
% ACQUISITION OF OFFSHORE TRANSMISSION CABLES
CAaotc = ((3.3565 * 10^-3 * Pwt) + (8.3872 * 10^-2)) * Loffs * 1.09;
% CAPEX OF INSTALLATION OF OFFSHORE TRANSMISSION CABLES
CAiotc = ((-6.318 * 10^-4 * Pwt) + (3.8125 * 10^-1)) * 1.09 * Loffs;
% CAPEX OF ACQUISITION OF ONSHORE TRANSMISSION CABLES
CAaontc = ((-3.3565 * 10^-3 * Pwt) + (8.3872 * 10^-2)) * 0.27 * Lonsh;
% CAPEX OF INSTALLATION OF ONSHORE TRANSMISSION CABLES
CAiontc = 0.578 * Lonsh;
% Total CAPEX
CApexT = (CAPwt + CAbui + CApm + CAscda + CAawpc + CAiwpc + CAaotc + CAiotc + CAaontc + CAiontc);
CAXNEW = CApexT – 0.2 * CApexT;
% OPEX
Dexex = 0.003 * CApexT;
% TOTAL CAPEX IN NAIRA
CApexTN = CApexT * USD * 10^3;
% TOTAL OPEX AND DEXEX IN NAIRA
DexexN = Dexex * USD * 10^3;
Opex = 0.035 * CApexT;
OpexN = Opex * USD * 10^3;
n = 20; Rb = 10; AEPv = 28298304; Civ = 668860000; Cdex = 2006600; Cpex = 23410000;
% Calculate LCOE
AEP = 28298304;
lcoe = calculate_lcoe(CAXNEW, Opex, WACC, AEP, T);
% Display the LCOE
disp([‘The LCOE is ‘, num2str(lcoe), ‘ currency units per kWh’]);
% Function definition
function lcoe = calculate_lcoe(CAXNEW, Opex, WACC, AEP, T)
% Calculate the numerator of the LCOE formula
numerator = CAXNEW;
for t = 1:T
numerator = numerator + Opex / (1 + WACC)^t;
end
% Calculate the denominator of the LCOE formula
denominator = 0;
for t = 1:T
denominator = denominator + AEP / (1 + WACC)^t;
end
% Calculate the LCOE
lcoe = numerator / denominator;
end CAPEX ESTIMATION (KUSD)
% CAPEX OF WIND TURBINE
USD = 1000; Pwt = 400; dp = 30; Nwt = 50; Lcc = 10620; Acc = 6691; Loffs = 10; Lonsh = 2;
CAPwt = 1497.9 * Pwt^0.87; T = 20; WACC = 0.10;
% CAPEX OF BUILDING
CAbui = (0.9181 * dp^2 – 31.43 * dp + 747.4) * 1.09 * Pwt;
% CAPEX OF PROJECT MANAGEMENT
CApm = 130.82 * Pwt;
% CAPEX OF SUPERVISORY CONTROL AND DATA ACQUISITION
CAscda = 555.1 * Nwt;
% CAPEX OF ACQUISITION OF WIND POWER CONNECTION CABLES
CAawpc = ((4.26 * 10^-4 * Acc) + (2.324 * 10^-1)) * 1.09 * Lcc;
% INSTALLATION OF WIND POWER CONNECTION CABLES
CAiwpc = ((-2.2684 * 10^-3 * Nwt) + (3.8018 * 10^-1)) * 1.09 * Lcc;
% ACQUISITION OF OFFSHORE TRANSMISSION CABLES
CAaotc = ((3.3565 * 10^-3 * Pwt) + (8.3872 * 10^-2)) * Loffs * 1.09;
% CAPEX OF INSTALLATION OF OFFSHORE TRANSMISSION CABLES
CAiotc = ((-6.318 * 10^-4 * Pwt) + (3.8125 * 10^-1)) * 1.09 * Loffs;
% CAPEX OF ACQUISITION OF ONSHORE TRANSMISSION CABLES
CAaontc = ((-3.3565 * 10^-3 * Pwt) + (8.3872 * 10^-2)) * 0.27 * Lonsh;
% CAPEX OF INSTALLATION OF ONSHORE TRANSMISSION CABLES
CAiontc = 0.578 * Lonsh;
% Total CAPEX
CApexT = (CAPwt + CAbui + CApm + CAscda + CAawpc + CAiwpc + CAaotc + CAiotc + CAaontc + CAiontc);
CAXNEW = CApexT – 0.2 * CApexT;
% OPEX
Dexex = 0.003 * CApexT;
% TOTAL CAPEX IN NAIRA
CApexTN = CApexT * USD * 10^3;
% TOTAL OPEX AND DEXEX IN NAIRA
DexexN = Dexex * USD * 10^3;
Opex = 0.035 * CApexT;
OpexN = Opex * USD * 10^3;
n = 20; Rb = 10; AEPv = 28298304; Civ = 668860000; Cdex = 2006600; Cpex = 23410000;
% Calculate LCOE
AEP = 28298304;
lcoe = calculate_lcoe(CAXNEW, Opex, WACC, AEP, T);
% Display the LCOE
disp([‘The LCOE is ‘, num2str(lcoe), ‘ currency units per kWh’]);
% Function definition
function lcoe = calculate_lcoe(CAXNEW, Opex, WACC, AEP, T)
% Calculate the numerator of the LCOE formula
numerator = CAXNEW;
for t = 1:T
numerator = numerator + Opex / (1 + WACC)^t;
end
% Calculate the denominator of the LCOE formula
denominator = 0;
for t = 1:T
denominator = denominator + AEP / (1 + WACC)^t;
end
% Calculate the LCOE
lcoe = numerator / denominator;
end my research MATLAB Answers — New Questions
choose B or C or D if A does not exist – how to write this?
Hi all,
I have the following:
switch joint
case ‘Knee’
prox = ‘HipJC’;
dist = ‘LEPI’;
wand = ‘THPA’ ;
end
side = {‘R’,’L’};
for i = 1:length(side)
wandMk = data.([side{i},wand]).line;
end
I got the following error: Unrecognized field name "LTHPA", which is because ‘LTHPA’ does not exist in my structure.
I could use ‘THPP’ or ‘THDA’ or ‘THDP’ instead of ‘THPA’, because I know these exist. Hence, how could I rewrite the above for this to run?
For example:
if ‘THPA’ does not exist then
wand = ‘THDA’ or ‘THDA’ or ‘THDP’
Thanks!Hi all,
I have the following:
switch joint
case ‘Knee’
prox = ‘HipJC’;
dist = ‘LEPI’;
wand = ‘THPA’ ;
end
side = {‘R’,’L’};
for i = 1:length(side)
wandMk = data.([side{i},wand]).line;
end
I got the following error: Unrecognized field name "LTHPA", which is because ‘LTHPA’ does not exist in my structure.
I could use ‘THPP’ or ‘THDA’ or ‘THDP’ instead of ‘THPA’, because I know these exist. Hence, how could I rewrite the above for this to run?
For example:
if ‘THPA’ does not exist then
wand = ‘THDA’ or ‘THDA’ or ‘THDP’
Thanks! Hi all,
I have the following:
switch joint
case ‘Knee’
prox = ‘HipJC’;
dist = ‘LEPI’;
wand = ‘THPA’ ;
end
side = {‘R’,’L’};
for i = 1:length(side)
wandMk = data.([side{i},wand]).line;
end
I got the following error: Unrecognized field name "LTHPA", which is because ‘LTHPA’ does not exist in my structure.
I could use ‘THPP’ or ‘THDA’ or ‘THDP’ instead of ‘THPA’, because I know these exist. Hence, how could I rewrite the above for this to run?
For example:
if ‘THPA’ does not exist then
wand = ‘THDA’ or ‘THDA’ or ‘THDP’
Thanks! for loop, indexing, if statement MATLAB Answers — New Questions
Browser updated
Your Browser has been updated has come up on my screen, and asks me to continue, if I do continue and update. (A) What, and if anything will change ? (B) When I switch the computer on, will it be the same as before I updated ?
Your Browser has been updated has come up on my screen, and asks me to continue, if I do continue and update. (A) What, and if anything will change ? (B) When I switch the computer on, will it be the same as before I updated ? Read More