Month: October 2024
Why is my function not recognized?
Greetings! I’ve written the following MATLAB script:
CorrectAnswers=[‘B’ ‘D’ ‘A’ ‘A’ ‘C’ ‘B’ ‘D’ ‘A’ ‘C’ ‘B’];
%These are the correct answers for a quiz. There are ten questions on the quiz.
Claire=[‘B’ ‘D’ ‘A’ ‘A’ ‘C’ ‘B’ ‘D’ ‘A’ ‘C’ ‘B’];
Oliver=[‘A’ ‘C’ ‘A’ ‘A’ ‘C’ ‘B’ ‘D’ ‘A’ ‘C’ ‘A’];
Lana=[‘B’ ‘D’ ‘B’ ‘A’ ‘C’ ‘B’ ‘D’ ‘B’ ‘C’ ‘B’];
Abbie=[‘B’ ‘B’ ‘A’ ‘C’ ‘C’ ‘B’ ‘D’ ‘A’ ‘D’ ‘B’];
Kevin=[‘B’ ‘D’ ‘A’ ‘A’ ‘D’ ‘B’ ‘D’ ‘A’ ‘C’ ‘B’];
%These are the answers five different students gave.
function [StudentScore]=CheckScore(StudentAnswers)
StudentScore=0;
for k=1:10
if StudentAnswers(k)==CorrectAnswers(k)
StudentScore=StudentScore+10;
end
end
disp(StudentScore)
end
%The above function checks if a student’s answers match the correct
%answers, which are defined in the vector "CorrectAnswers". The score
%increases by 10 for each matching answer.
When writing, I received the following error in the script file: "Line 11: Function might be unused." For reference, Line 11 is shown below:
function [StudentScore]=CheckScore(StudentAnswers)
When I go to the Command Window to call the function "CheckScore", like below, this is the result:
>> CheckScore(Oliver)
Unrecognized function or variable ‘CheckScore’.
I’m not sure why "CheckScore" is undefined, when I (think I) defined it as a for loop within the function code. I feel like there’s a very simple fix for this, but I can’t for the life of me figure it out. Any help is appreciated, and thank you for your time!Greetings! I’ve written the following MATLAB script:
CorrectAnswers=[‘B’ ‘D’ ‘A’ ‘A’ ‘C’ ‘B’ ‘D’ ‘A’ ‘C’ ‘B’];
%These are the correct answers for a quiz. There are ten questions on the quiz.
Claire=[‘B’ ‘D’ ‘A’ ‘A’ ‘C’ ‘B’ ‘D’ ‘A’ ‘C’ ‘B’];
Oliver=[‘A’ ‘C’ ‘A’ ‘A’ ‘C’ ‘B’ ‘D’ ‘A’ ‘C’ ‘A’];
Lana=[‘B’ ‘D’ ‘B’ ‘A’ ‘C’ ‘B’ ‘D’ ‘B’ ‘C’ ‘B’];
Abbie=[‘B’ ‘B’ ‘A’ ‘C’ ‘C’ ‘B’ ‘D’ ‘A’ ‘D’ ‘B’];
Kevin=[‘B’ ‘D’ ‘A’ ‘A’ ‘D’ ‘B’ ‘D’ ‘A’ ‘C’ ‘B’];
%These are the answers five different students gave.
function [StudentScore]=CheckScore(StudentAnswers)
StudentScore=0;
for k=1:10
if StudentAnswers(k)==CorrectAnswers(k)
StudentScore=StudentScore+10;
end
end
disp(StudentScore)
end
%The above function checks if a student’s answers match the correct
%answers, which are defined in the vector "CorrectAnswers". The score
%increases by 10 for each matching answer.
When writing, I received the following error in the script file: "Line 11: Function might be unused." For reference, Line 11 is shown below:
function [StudentScore]=CheckScore(StudentAnswers)
When I go to the Command Window to call the function "CheckScore", like below, this is the result:
>> CheckScore(Oliver)
Unrecognized function or variable ‘CheckScore’.
I’m not sure why "CheckScore" is undefined, when I (think I) defined it as a for loop within the function code. I feel like there’s a very simple fix for this, but I can’t for the life of me figure it out. Any help is appreciated, and thank you for your time! Greetings! I’ve written the following MATLAB script:
CorrectAnswers=[‘B’ ‘D’ ‘A’ ‘A’ ‘C’ ‘B’ ‘D’ ‘A’ ‘C’ ‘B’];
%These are the correct answers for a quiz. There are ten questions on the quiz.
Claire=[‘B’ ‘D’ ‘A’ ‘A’ ‘C’ ‘B’ ‘D’ ‘A’ ‘C’ ‘B’];
Oliver=[‘A’ ‘C’ ‘A’ ‘A’ ‘C’ ‘B’ ‘D’ ‘A’ ‘C’ ‘A’];
Lana=[‘B’ ‘D’ ‘B’ ‘A’ ‘C’ ‘B’ ‘D’ ‘B’ ‘C’ ‘B’];
Abbie=[‘B’ ‘B’ ‘A’ ‘C’ ‘C’ ‘B’ ‘D’ ‘A’ ‘D’ ‘B’];
Kevin=[‘B’ ‘D’ ‘A’ ‘A’ ‘D’ ‘B’ ‘D’ ‘A’ ‘C’ ‘B’];
%These are the answers five different students gave.
function [StudentScore]=CheckScore(StudentAnswers)
StudentScore=0;
for k=1:10
if StudentAnswers(k)==CorrectAnswers(k)
StudentScore=StudentScore+10;
end
end
disp(StudentScore)
end
%The above function checks if a student’s answers match the correct
%answers, which are defined in the vector "CorrectAnswers". The score
%increases by 10 for each matching answer.
When writing, I received the following error in the script file: "Line 11: Function might be unused." For reference, Line 11 is shown below:
function [StudentScore]=CheckScore(StudentAnswers)
When I go to the Command Window to call the function "CheckScore", like below, this is the result:
>> CheckScore(Oliver)
Unrecognized function or variable ‘CheckScore’.
I’m not sure why "CheckScore" is undefined, when I (think I) defined it as a for loop within the function code. I feel like there’s a very simple fix for this, but I can’t for the life of me figure it out. Any help is appreciated, and thank you for your time! function, for loop, matlab function MATLAB Answers — New Questions
Matlab migration from 2019b to 2021b
Hello Team,
Currently i am doing the model migration from 2019 to 2021.
I have noted , while generating the code the code optimization or code generated in such a way that for the goto SLblock of model or the signal used locally inside subsystem the code is not generated and also for the nested loop the code is generated proper way.
I just want to explore more , when we migrate the matlab version of the model what are all the necessary parameters needs to check both in simulink model to code generation.
Can someone help me to explore more on this migration topic.
Thank uHello Team,
Currently i am doing the model migration from 2019 to 2021.
I have noted , while generating the code the code optimization or code generated in such a way that for the goto SLblock of model or the signal used locally inside subsystem the code is not generated and also for the nested loop the code is generated proper way.
I just want to explore more , when we migrate the matlab version of the model what are all the necessary parameters needs to check both in simulink model to code generation.
Can someone help me to explore more on this migration topic.
Thank u Hello Team,
Currently i am doing the model migration from 2019 to 2021.
I have noted , while generating the code the code optimization or code generated in such a way that for the goto SLblock of model or the signal used locally inside subsystem the code is not generated and also for the nested loop the code is generated proper way.
I just want to explore more , when we migrate the matlab version of the model what are all the necessary parameters needs to check both in simulink model to code generation.
Can someone help me to explore more on this migration topic.
Thank u matlab migration from 2019b to 2021b MATLAB Answers — New Questions
What is the relationship between sample time,simulation time and sample per frame of bernoulli Binary generator?
Bernoulli binary generator is a block in simulink which generate random binary signal.The Block consist of 2 fields Sample time and sample per frame? I want to know the relationship between sample time,sample per frame and simulation time?
For example if I set sample time 0.01s, sample per frame 1000 and simulation time 10000 then what is my bit rate?Bernoulli binary generator is a block in simulink which generate random binary signal.The Block consist of 2 fields Sample time and sample per frame? I want to know the relationship between sample time,sample per frame and simulation time?
For example if I set sample time 0.01s, sample per frame 1000 and simulation time 10000 then what is my bit rate? Bernoulli binary generator is a block in simulink which generate random binary signal.The Block consist of 2 fields Sample time and sample per frame? I want to know the relationship between sample time,sample per frame and simulation time?
For example if I set sample time 0.01s, sample per frame 1000 and simulation time 10000 then what is my bit rate? simulink, matlab, communication, digital signal processing MATLAB Answers — New Questions
I am having trouble with Taylor approximation to e^x at 0
function y=myexp(x,n);
%this is my first function
%y is the n-th order Taylor approximation to exp(x)
%x is a scalar; n is positive integer
y=1;
term=1;
for k=1:n %n is a scalar
term=term*x/k;
y=y+term;
end
I am taking this error.
Not enough input arguments.
Error in myexp (line 8)
for k=1:n %n is a scalar
what is wrong with that?function y=myexp(x,n);
%this is my first function
%y is the n-th order Taylor approximation to exp(x)
%x is a scalar; n is positive integer
y=1;
term=1;
for k=1:n %n is a scalar
term=term*x/k;
y=y+term;
end
I am taking this error.
Not enough input arguments.
Error in myexp (line 8)
for k=1:n %n is a scalar
what is wrong with that? function y=myexp(x,n);
%this is my first function
%y is the n-th order Taylor approximation to exp(x)
%x is a scalar; n is positive integer
y=1;
term=1;
for k=1:n %n is a scalar
term=term*x/k;
y=y+term;
end
I am taking this error.
Not enough input arguments.
Error in myexp (line 8)
for k=1:n %n is a scalar
what is wrong with that? matlab, homework MATLAB Answers — New Questions
百家乐开户电话_17300435119(微同)
function addListViewWebPart() {
var context = SP.ClientContext.get_current();
var web = context.get_web();
var list = web.get_lists().getByTitle(‘你的列表标题’);
var view = list.get_views().getByTitle(‘你的视图标题’);
context.load(view);
context.executeQueryAsync(
function() {
var viewGuid = view.get_serverRelativeUrl();
var html = ‘<WebPartPages:ContentWebPart … ViewSelector=”‘ + viewGuid + ‘” />’;
// 使用JavaScript在页面上动态添加Web部件
var allWebParts = document.getElementsByTagName(‘WebPart’);
var container = document.createElement(‘div’);
container.innerHTML = html;
var webPart = container.firstChild;
allWebParts[0].parentNode.insertBefore(webPart, allWebParts[0]);
SP.WebPart.associateWebPartWithDedicatedTemplate(webPart, ”);
},
function(sender, args) {
console.log(‘请求失败:’ + args.get_message());
}
);
}
function addListViewWebPart() {var context = SP.ClientContext.get_current();var web = context.get_web();var list = web.get_lists().getByTitle(‘你的列表标题’);var view = list.get_views().getByTitle(‘你的视图标题’);context.load(view);context.executeQueryAsync(function() {var viewGuid = view.get_serverRelativeUrl();var html = ‘<WebPartPages:ContentWebPart … ViewSelector=”‘ + viewGuid + ‘” />’;// 使用JavaScript在页面上动态添加Web部件var allWebParts = document.getElementsByTagName(‘WebPart’);var container = document.createElement(‘div’);container.innerHTML = html;var webPart = container.firstChild;allWebParts[0].parentNode.insertBefore(webPart, allWebParts[0]);SP.WebPart.associateWebPartWithDedicatedTemplate(webPart, ”);},function(sender, args) {console.log(‘请求失败:’ + args.get_message());});} Read More
Difference between MATLAB Web Server and MATLAB Web App Server ?
What is the difference between MATLAB Web Server and MATLAB Web App Server ??
https://ww2.mathworks.cn/matlabcentral/fileexchange/29027-web-server
https://ww2.mathworks.cn/en/products/matlab-web-app-server.html
Three Questions :
1.) I wish to setup a Web Page, for which when user clicks a button, it can send request to run a MATLAB .m program at the back end, and then transfer the output image to the web page. Which server (Web or Web App) should I choose ?
2.) Any real examples, not just guideline can be provided ??
3.) Any English Document about the two web server ??What is the difference between MATLAB Web Server and MATLAB Web App Server ??
https://ww2.mathworks.cn/matlabcentral/fileexchange/29027-web-server
https://ww2.mathworks.cn/en/products/matlab-web-app-server.html
Three Questions :
1.) I wish to setup a Web Page, for which when user clicks a button, it can send request to run a MATLAB .m program at the back end, and then transfer the output image to the web page. Which server (Web or Web App) should I choose ?
2.) Any real examples, not just guideline can be provided ??
3.) Any English Document about the two web server ?? What is the difference between MATLAB Web Server and MATLAB Web App Server ??
https://ww2.mathworks.cn/matlabcentral/fileexchange/29027-web-server
https://ww2.mathworks.cn/en/products/matlab-web-app-server.html
Three Questions :
1.) I wish to setup a Web Page, for which when user clicks a button, it can send request to run a MATLAB .m program at the back end, and then transfer the output image to the web page. Which server (Web or Web App) should I choose ?
2.) Any real examples, not just guideline can be provided ??
3.) Any English Document about the two web server ?? matlab web server MATLAB Answers — New Questions
Not able to Linking Microsoft Learning personal with company Profile
I have tried to link my personal Microsoft profile with Official Company Microsoft profile but merging is not happening,Can you please help on this.
I have tried to link my personal Microsoft profile with Official Company Microsoft profile but merging is not happening,Can you please help on this. Read More
دفع بعد النتيجة رقم ساحر في الامارات واتساب / 009647842488906 سحر التفريقOneDrive
We have windows 10 1709 with OneDrive files on demand enabled
One of my users have an issue where if he opens and closes a file the changes the date modified.
His computer is a relatively new رقم ساحر في الأمارات installation and he is patched up to February’s updates.
We have windows 10 1709 with OneDrive files on demand enabled
One of my ساحر سفلي users have an issue where if he opens and closes a file the changes the date modified.
We have windows 10 1709 with OneDrive files on demand enabledOne of my users have an issue where if he opens and closes a file the changes the date modified.His computer is a relatively new رقم ساحر في الأمارات installation and he is patched up to February’s updates. We have windows 10 1709 with OneDrive files on demand enabledOne of my ساحر سفلي users have an issue where if he opens and closes a file the changes the date modified. Read More
TLS for Sentinel Syslog CEF Data connector(Secure Transfer of logs to Sentinel Log analytics workspa
Sentinel Data connector Syslog CEF is a feature that allows you to collect data from various sources using the Common Event Format (CEF) or Syslog protocols and send it to Azure Sentinel, a cloud-native security information and event management (SIEM) solution. By using this connector, you can integrate your existing security tools and devices with Sentinel and gain more visibility and insights into your network and security events.
Ingest syslog and CEF messages to Microsoft Sentinel – AMA | Microsoft Learn
The connection using this method happens over TCP/UDP 514 which is in plain text.
However, some sources may require a secure connection to transmit data using Syslog over TLS (Transport Layer Security). This ensures that the data is encrypted and authenticated between the sender and the receiver. In this article, we will show you how to configure TLS for Syslog on a Linux machine and connect it to Azure Sentinel using the Sentinel Data connector for CEF.
There are two scenarios where there will be a need to establish encrypted connection between data sources and Syslog CEF log collector.
Third party data sources mandate use of TLS connection to send syslog events.
Customer wants to leverage TLS connection to secure data over public Internet.
For example, if we look at existing Sentinel data connector for Mcafee ePO(McAfee ePolicy Orchestrator (ePO)), it talks about deploying Linux machine with Syslog and then deploying the OMS agent. But Mcafee ePO mandates use of TLS connection between Mcafee ePO and Syslog collector. The Sentinel data connector does not guide on using TLS connection and related configuration.
Configuration TLS for Syslog
To address this requirement , you have to configure syslog collector to accept TLS connection from data sources like Mcafee ePO by following the below steps. This example is based on GnuTLS.
Install the necessary packages, such as rsyslog-gnutls, on the Linux machine.
———————————————————————————–
[root@node ~]# yum -y install gnutls-utils
[root@node ~]# yum -y install gnutls-utils
———————————————————————————–
Note : On RHEL system you must have an active subscription to RHN or you can configure a local offline repository using which “yum” package manager can install the provided rpm and it’s dependencies.
Generate or obtain the necessary certificates and keys for TLS.
To create a self-signed certificate for secure transfer of syslog, we will use certtool which is part of GnuTLS
Generate the private key
————————————————————————————
[root@node ~]# certtool –generate-privkey –outfile ca-key.pem
Generating a 2048 bit RSA private key…
[root@node ~]# ls -l
total 4
-rw——- 1 root root 5813 Apr 16 14:12 ca-key.pem
————————————————————————————
Now create the (self-signed) CA certificate itself. This command queries you for a number of things. Use appropriate responses. When it comes to certificate validity, keep in mind that you need to recreate all certificates when this one expires. So it may be a good idea to use a long period, eg. 3650 days (roughly 10 years). You need to specify that the certificates belongs to an authority. The certificate is used to sign other certificates.
————————————————————————————
[root@node ~]# certtool –generate-self-signed –load-privkey ca-key.pem –outfile ca.pem
Generating a self signed certificate…
————————————————————————————
Please enter the details of the certificate’s distinguished name. Just press enter to ignore a field.
Validate the newly created key.
————————————————————————————
[root@node ~]# ls -l
total 30
-r——– 1 root root 5813 Apr 16 14:12 ca-key.pem
-rw-r–r– 1 root root 1143 Apr 16 14:16 ca.pem
————————————————————————————
Note: ca-key.pem is a private key of certificate authority and ca.pem is a public key that we are going to distribute to the other nodes.
Generate machine certificate
In this step, we generate certificates for the machine. The certificate identifies the machine to the remote peer.
Here –outfile reflects the name of the server that’s going to use the private key i.e. node-key.pem for us. This way it is easier to identify the key and the mapped node name.
————————————————————————————
[root@node ~]# certtool –generate-privkey –outfile node-key.pem –bits 2048
** Note: Please use the –sec-param instead of –bits
Generating a 2048 bit RSA private key…
[root@node ~]# certtool –generate-request –load-privkey node-key.pem –outfile node3-request.pem
Generating a PKCS #10 certificate request...
————————————————————————————-
Now validate the node-key.pem which we have created.
————————————————————————————
[root@node ~]# ls -l
total 60
-r——– 1 root root 5813 Apr 16 14:12 ca-key.pem
-rw-r–r– 1 root root 1143 Apr 16 14:16 ca.pem
-rw——- 1 root root 5826 Apr 16 14:18 node-key.pem
————————————————————————————-
Configure the /etc/rsyslog.d/rsyslog.conf file to enable TLS by specifying the path to the certificates and keys, and setting the appropriate parameters for the Syslog input module.
————————————————————————————-
# make gtls driver the default
$DefaultNetstreamDriver gtls
# certificate files
$DefaultNetstreamDriverCAFile /etc/rsyslog-keys/ca.pem
$DefaultNetstreamDriverCertFile /etc/rsyslog-keys/node-cert.pem
$DefaultNetstreamDriverKeyFile /etc/rsyslog-keys/node-key.pem
$ModLoad imtcp # TCP listener
$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
$InputTCPServerStreamDriverAuthMode anon
$InputTCPServerRun 6514 # start up listener at port 10514
————————————————————————————-
Restart the rsyslog service to apply the changes.
————————————————————————————-
[root@node rsyslog.d]# systemctl restart rsyslog
———————————————————————————–
Verify that the Syslog server is accepting TLS connections by sending test logs from a data source using Syslog over TLS.
You can test by using openssl command as shown below sample output.
————————————————————————————-
[root@Node1 ~]# openssl s_client -cipher DHE-RSA-AES128-GCM-SHA256 -connect NODE2.example.com:6514
CONNECTED(00000003)
depth=0 C = IN, CN = NODE2.example.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 C = IN, CN = NODE2.example.com
verify error:num=21:unable to verify the first certificate
verify return:1
depth=0 C = IN, CN = NODE2.example.com
verify return:1
—
Certificate chain
0 s:C = IN, CN = NODE2.example.com
i:C = IN, ST = Maharashtra, L = Pune, O = Company Ltd, OU = SOC, CN = NODE2.example.com, emailAddress = gsocsupport@example.com
a:PKEY: rsaEncryption, 2048 (bit); sigalg: RSA-SHA256
v:NotBefore: Dec 21 11:27:11 2023 GMT; NotAfter: May 6 11:27:20 2051 GMT
—
Server certificate
—–BEGIN CERTIFICATE—–
MIIEmTCCAwGgAwIBAgIUZdKmTPtXQHMfmzI914efcqT0WZIwDQYJKoZIhvcNAQEL
TS1TT0MxJTAjBgNVBAMTHEFNQVBVTkNPTDAzLnRlY2htYWhpbmRyYS5jb20xKzAp
BgkqhkiG9w0BCQEWHGdzb2NzdXBwb3J0QHRlY2htYWhpbmRyYS5jb20wIBcNMjMx
MjIxMTEyNzExWhgPMjA1MTA1MDYxMTI3MjBaMDQxCzAJBgNVBAYTAklOMSUwIwYD
—–END CERTIFICATE—–
subject=C = IN, CN = NODE2.example.com
issuer=C = IN, ST = Maharashtra, L = Pune, O = Company Ltd, OU = SOC, CN = NODE2.example.com, emailAddress = gsocsupport@example.com
—
Acceptable client certificate CA names
C = IN, ST = Maharashtra, L = Pune, O = Company Ltd, OU = SOC, CN = NODE2.example.com, emailAddress = gsocsupport@example.com
Client Certificate Types: RSA sign, ECDSA sign
Requested Signature Algorithms: RSA+SHA256:RSA-PSS+SHA256:RSA-PSS+SHA256:ECDSA+SHA256:0x07+0x08:RSA+SHA384:RSA-PSS+SHA384:RSA-PSS+SHA384:ECDSA+SHA384:0x08+0x08:RSA+SHA512:RSA-PSS+SHA512:RSA-PSS+SHA512:ECDSA+SHA512:0x01+0x02:0x03+0x02
Shared Requested Signature Algorithms: RSA+SHA256:RSA-PSS+SHA256:RSA-PSS+SHA256:ECDSA+SHA256:RSA+SHA384:RSA-PSS+SHA384:RSA-PSS+SHA384:ECDSA+SHA384:RSA+SHA512:RSA-PSS+SHA512:RSA-PSS+SHA512:ECDSA+SHA512
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: DH, 2048 bits
—
SSL handshake has read 2367 bytes and written 625 bytes
Verification error: unable to verify the first certificate
—
New, TLSv1.2, Cipher is DHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : DHE-RSA-AES128-GCM-SHA256
Session-ID: 26844E8D6AF21FBFFA63654EDCD2052546EDB90A7B9B723A248E9C71B98FB26A
Session-ID-ctx:
Master-Key: CD0707D7E5671FAC435170A6745D7E87CFDED1C5A1821CDAF1F68AA3B731204D13D1A4F709484B1052CA06E63C6FCB74
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1704374155
Timeout : 7200 (sec)
Verify return code: 21 (unable to verify the first certificate)
Extended master secret: yes
————————————————————————————-
Microsoft Tech Community – Latest Blogs –Read More
How to Install Matlab R2019b from Intune
I have been tasked to migrate all our Matlab installation from SCCM to Intune. So I am starting with Matlab R2019b and having quite a hard time to get it working via Intune,
I’ve been using this custom install.bat file I found on reddit:
https://www.reddit.com/r/Intune/comments/1bjh28f/matlab_software_deployment_via_intune/#:~:text=We%20ended%20up%20wrapping%20the,a%20ton%20of%20small%20files.
setup.exe -inputFile C:tempmy_installer_input.txt timeout /t 60 >nul :WAITLOOP tasklist | find "MathWorksProductInstaller" >nul if not errorlevel 1 ( timeout /t 10 >nul goto :WAITLOOP )
I’ve finally been able to get it installed on my test environement but it’s missing all the installer input from the installer.ini file.
Any idea what I am doing wrong ?I have been tasked to migrate all our Matlab installation from SCCM to Intune. So I am starting with Matlab R2019b and having quite a hard time to get it working via Intune,
I’ve been using this custom install.bat file I found on reddit:
https://www.reddit.com/r/Intune/comments/1bjh28f/matlab_software_deployment_via_intune/#:~:text=We%20ended%20up%20wrapping%20the,a%20ton%20of%20small%20files.
setup.exe -inputFile C:tempmy_installer_input.txt timeout /t 60 >nul :WAITLOOP tasklist | find "MathWorksProductInstaller" >nul if not errorlevel 1 ( timeout /t 10 >nul goto :WAITLOOP )
I’ve finally been able to get it installed on my test environement but it’s missing all the installer input from the installer.ini file.
Any idea what I am doing wrong ? I have been tasked to migrate all our Matlab installation from SCCM to Intune. So I am starting with Matlab R2019b and having quite a hard time to get it working via Intune,
I’ve been using this custom install.bat file I found on reddit:
https://www.reddit.com/r/Intune/comments/1bjh28f/matlab_software_deployment_via_intune/#:~:text=We%20ended%20up%20wrapping%20the,a%20ton%20of%20small%20files.
setup.exe -inputFile C:tempmy_installer_input.txt timeout /t 60 >nul :WAITLOOP tasklist | find "MathWorksProductInstaller" >nul if not errorlevel 1 ( timeout /t 10 >nul goto :WAITLOOP )
I’ve finally been able to get it installed on my test environement but it’s missing all the installer input from the installer.ini file.
Any idea what I am doing wrong ? intune installation MATLAB Answers — New Questions
Encrypting and Decrypting web.config in ASP.NET applications
Securing sensitive data like connection strings and credentials in configuration files is a critical practice for any web application. In traditional ASP.NET, the web.config file often contains such data. Exposing this information can lead to security risks, making it essential to protect these values. This article will walk you through the process of encrypting and decrypting sections of the web.config file in ASP.NET.
ASP.NET allows you to encrypt specific sections of the web.config file. The most common sections to encrypt include:
connectionStrings: Where your database connection strings are stored.
appSettings: Where custom application settings or sensitive configuration values are kept.
ASP.NET provides a built-in tool called aspnet_regiis.exe to encrypt and decrypt sections of the web.config file. The tool is located in the .NET Framework directory.
Location of the Tool:
For 32bit: C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_regiis.exe
For 64bit: C:WindowsMicrosoft.NETFramework64v4.0.30319aspnet_regiis.exe
Steps to Encrypt the web.config File:
To begin, open the Command Prompt as an administrator.
Navigate to the root directory of your ASP.NET application where the web.config file is located.
Here is the general syntax for encrypting a configuration section:
aspnet_regiis.exe -pef “section” “physical_directory” -prov “provider”
To encrypt the <connectionStrings> section, run the following command:
aspnet_regiis.exe -pef “connectionStrings” “C:inetpubwwwrootMyApp” -prov “DataProtectionConfigurationProvider”
If the command runs successfully, you’ll see a confirmation message like this:
After running the command, open your web.config file. You will notice that the content of the connectionStrings section is now encrypted. It will look something like this:
Steps to Decrypt the web.config File:
To decrypt the configuration section, you can use:
aspnet_regiis.exe -pdf “connectionStrings” “C:inetpubwwwrootMyApp”
If the command runs successfully, you’ll see a confirmation message like this:
This will revert the encrypted section back to plain text. Open your web.config file, and you’ll see that the content in the connectionStrings section has been decrypted back to plain text, as shown below.
You can use the same aspnet_regiis.exe tool to encrypt other sections of the web.config, such as appSettings.
Important Notes:
The encryption done by the aspnet_regiis tool is machine-specific by default. This means the encrypted file can only be decrypted on the machine where it was encrypted. This ensures an additional layer of security.
If you need to migrate your web.config to another server, you will need to decrypt it first on the original server and then encrypt it again on the destination server.
Kindly ensure that the account under which your application runs has appropriate permissions to access and use the encrypted web.config file.
Conclusion
Encrypting sensitive data in the web.config file is a simple yet powerful way to safeguard your ASP.NET applications from potential security breaches. The aspnet_regiis tool provides an easy to use solution for encrypting and decrypting specific sections of the web.config. By following the above steps in this article, you can ensure your application’s sensitive data remains protected.
Microsoft Tech Community – Latest Blogs –Read More
Which link contains the MATLAB Documentation in English Version ?
Which link contains the MATLAB Documentation in English Version ?Which link contains the MATLAB Documentation in English Version ? Which link contains the MATLAB Documentation in English Version ? matlab documentation MATLAB Answers — New Questions
May I ask can MTALAB code be run under Apache Server ?? If it can, can an example be shown for this ?
May I ask can MTALAB code be run at the backend of Apache Server ?? If it can, can an example showing the step of setup be shown for this ??May I ask can MTALAB code be run at the backend of Apache Server ?? If it can, can an example showing the step of setup be shown for this ?? May I ask can MTALAB code be run at the backend of Apache Server ?? If it can, can an example showing the step of setup be shown for this ?? apache server MATLAB Answers — New Questions
View-Only permission in Sharepoint Site Permissions MISSING
I followed some guides such as solution and repeated solution to ‘activate’ a feature for a site I created at my org so that the ‘view only’ permission populates along the following:
Full ControlDesignEditContributeRead
I made sure I did this at the site collection level (which was activated already) and then at the site I created (which was not activated). The result is, I still do not see the “View” permission populate. I also have files in the document library. Am I missing something? I know I can create the permission but if I activated what was suggested in the two links I provided, should the “View” not populate?
Thanks!
I followed some guides such as solution and repeated solution to ‘activate’ a feature for a site I created at my org so that the ‘view only’ permission populates along the following:Full ControlDesignEditContributeReadI made sure I did this at the site collection level (which was activated already) and then at the site I created (which was not activated). The result is, I still do not see the “View” permission populate. I also have files in the document library. Am I missing something? I know I can create the permission but if I activated what was suggested in the two links I provided, should the “View” not populate? Thanks! Read More
Copy values to a cell based on color
Hello I need help,
Column A ( file attached) has some blank cells with colors inside them.
I need to fill them with values, based on color matching from adjacent columns
Hello I need help, Column A ( file attached) has some blank cells with colors inside them. I need to fill them with values, based on color matching from adjacent columns Read More
Enjoy Pizza Tower’s Unique Music
Pizza Tower certainly stands up to the current hype. It’s no surprise that it receives such excellent reviews, given the fast-paced platforming action, chaotic fighting, and lively soundtrack. The pizza tower music is also shockingly good for an indie game created by a tiny team. The game includes over 100 tunes. The tunes aren’t simply small 40-second loops, either; they’re many minutes lengthy. They combine techno, actual instruments, and goofy sound effects to produce tracks that are ideal for each of their levels. Some of my favourites are “Hot Spaghetti,” “The Death That I Deservioli,” “Wednesdays,” and “Unexpectancy,” the last boss theme. These are only a few songs from the entire soundtrack. A collection of all 146 songs can be found by searching for Pizza Tower OST on YouTube. To be honest, the soundtrack of this small game is superior to any released by Nintendo, a multibillion-dollar corporation, in recent years.
Pizza Tower certainly stands up to the current hype. It’s no surprise that it receives such excellent reviews, given the fast-paced platforming action, chaotic fighting, and lively soundtrack. The pizza tower music is also shockingly good for an indie game created by a tiny team. The game includes over 100 tunes. The tunes aren’t simply small 40-second loops, either; they’re many minutes lengthy. They combine techno, actual instruments, and goofy sound effects to produce tracks that are ideal for each of their levels. Some of my favourites are “Hot Spaghetti,” “The Death That I Deservioli,” “Wednesdays,” and “Unexpectancy,” the last boss theme. These are only a few songs from the entire soundtrack. A collection of all 146 songs can be found by searching for Pizza Tower OST on YouTube. To be honest, the soundtrack of this small game is superior to any released by Nintendo, a multibillion-dollar corporation, in recent years. Read More
running Matlab batch error: ERROR: MATLAB error Exit Status: 0x00000001
running this command in both the command line and in Jenkins gives me error:
matlab -batch "addpath(fullfile(pwd,’functions’)); exit(runJenkins)"
here are some other text displayed ; these are unit tests outputs.The unit test passed, but the error still shows up.
Running mysqrt_Test
..
Done mysqrt_Test
__________
1
ERROR: MATLAB error Exit Status: 0x00000001
C:UsersODMEDAppDataLocalJenkins.jenkinsworkspaceMatlab test>exit 1
Build step ‘Execute Windows batch command’ marked build as failure
Finished: FAILURErunning this command in both the command line and in Jenkins gives me error:
matlab -batch "addpath(fullfile(pwd,’functions’)); exit(runJenkins)"
here are some other text displayed ; these are unit tests outputs.The unit test passed, but the error still shows up.
Running mysqrt_Test
..
Done mysqrt_Test
__________
1
ERROR: MATLAB error Exit Status: 0x00000001
C:UsersODMEDAppDataLocalJenkins.jenkinsworkspaceMatlab test>exit 1
Build step ‘Execute Windows batch command’ marked build as failure
Finished: FAILURE running this command in both the command line and in Jenkins gives me error:
matlab -batch "addpath(fullfile(pwd,’functions’)); exit(runJenkins)"
here are some other text displayed ; these are unit tests outputs.The unit test passed, but the error still shows up.
Running mysqrt_Test
..
Done mysqrt_Test
__________
1
ERROR: MATLAB error Exit Status: 0x00000001
C:UsersODMEDAppDataLocalJenkins.jenkinsworkspaceMatlab test>exit 1
Build step ‘Execute Windows batch command’ marked build as failure
Finished: FAILURE batch, jenkins, cmd, command line MATLAB Answers — New Questions
New list UI : Add column does not display “Add a content type” when allow management of content type
I’m trying to add a new content type to a list. Now they recommended adding a content type with the add column option in the list. However, even if the list advanced setting “allow management of content type” is enabled, the option does not show when using the add column list option.
Is this normal?
I’m trying to add a new content type to a list. Now they recommended adding a content type with the add column option in the list. However, even if the list advanced setting “allow management of content type” is enabled, the option does not show when using the add column list option. Is this normal? Read More
Colo alteration image acquisition GUI
Hi to everybody,
I have a GUI which must acquire images from a web cam, and show two images in two windows.
In the first axes i show the original frame, and in the second axes, i ‘d like to show the image after a short elaboration. In this second image i got problems, only if i make it show the raw ‘shot’ (see below) i got a correct output (the same as the first window), in all the other cases (as in the one reported below) i get a reddish image in false color.Even using the img2bw conversion, the image in the second windows is in the same absurd colors..
Below i report the callback text, in the OpFn I just inizialise the acquisition. Nowhere in the code is a reference to this axes, or other instructions that could be in some way related to this.
start(handles.video1);
for j=1:200
shot=getsnapshot(handles.video1);
imshow(shot);
image(shot, ‘Parent’,handles.axes1);
R = shot(:,:,1); %to show only the red channel
image(R, ‘Parent’,handles.axes2);
end
Thak you for your help
marioHi to everybody,
I have a GUI which must acquire images from a web cam, and show two images in two windows.
In the first axes i show the original frame, and in the second axes, i ‘d like to show the image after a short elaboration. In this second image i got problems, only if i make it show the raw ‘shot’ (see below) i got a correct output (the same as the first window), in all the other cases (as in the one reported below) i get a reddish image in false color.Even using the img2bw conversion, the image in the second windows is in the same absurd colors..
Below i report the callback text, in the OpFn I just inizialise the acquisition. Nowhere in the code is a reference to this axes, or other instructions that could be in some way related to this.
start(handles.video1);
for j=1:200
shot=getsnapshot(handles.video1);
imshow(shot);
image(shot, ‘Parent’,handles.axes1);
R = shot(:,:,1); %to show only the red channel
image(R, ‘Parent’,handles.axes2);
end
Thak you for your help
mario Hi to everybody,
I have a GUI which must acquire images from a web cam, and show two images in two windows.
In the first axes i show the original frame, and in the second axes, i ‘d like to show the image after a short elaboration. In this second image i got problems, only if i make it show the raw ‘shot’ (see below) i got a correct output (the same as the first window), in all the other cases (as in the one reported below) i get a reddish image in false color.Even using the img2bw conversion, the image in the second windows is in the same absurd colors..
Below i report the callback text, in the OpFn I just inizialise the acquisition. Nowhere in the code is a reference to this axes, or other instructions that could be in some way related to this.
start(handles.video1);
for j=1:200
shot=getsnapshot(handles.video1);
imshow(shot);
image(shot, ‘Parent’,handles.axes1);
R = shot(:,:,1); %to show only the red channel
image(R, ‘Parent’,handles.axes2);
end
Thak you for your help
mario image color alteration, image acquisition, image display MATLAB Answers — New Questions
How to measure crack width
I noticed that when I reduced the minimum acceptable area the crack width decreased although the appearance of blobs in this situation, while when i increased minimum acceptable area and the blobs removed and the width increased
for example:
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 10;
% Read in image and convert to gray scale.
rgbImage = imread(‘7004-46.jpg’);
I = rgb2gray(rgbImage);
subplot(2,2,1);
imshow(I);
title(‘7004-46’);
% Take histogram.
subplot(2,2,2);
histogram(I);
grid on; %to make grid line
title(‘histogram Gray image’);
% Binarize image.
threshold = 145;
xline(threshold, ‘Color’, ‘r’, ‘LineWidth’,2)
mask=I < threshold;
mask = imfill(mask, ‘holes’);
% Filter image.
se = strel(‘line’,1, 0);
filteredImage = imclose(mask, se);
subplot(2, 2, 3);
imshow(filteredImage);
title(‘closed Image’);
%%% Measure the areas to determin minAcceptableArea show the histogram of
%%% area
% props = regionprops(filteredImage, ‘Area’);
% allAreas = sort([props.Area], ‘descend’);
% histogram(allAreas)
%%Look at the histogram. What area do you think is the minimum size to be a valid crack?
minAcceptableArea =20;
mask = bwareafilt(filteredImage, [minAcceptableArea, inf]);
subplot(2, 2, 4);
imshow(mask);
%
% % Measure size of crack.
props = regionprops(mask, ‘Area’);
allAreas = [props.Area];
out=bwferet(mask)
% Measure the areas to know the area not to be considered
% props = regionprops(mask, ‘Area’);
% allAreas = sort([props.Area], ‘descend’)
% Get width = area / maximum length
averageWidths = sort(allAreas ./ out.MaxDiameter, ‘descend’);
message = sprintf(‘The average width = %.2f pixels.’, averageWidths(1));
fprintf(‘%sn’, message);
caption = sprintf(‘Binary Image of Cracks larger than %dnAverage width of largest = %.2f pixels’, minAcceptableArea, averageWidths(1));
title(caption, ‘FontSize’, fontSize, ‘Interpreter’, ‘None’);
uiwait(helpdlg(message));I noticed that when I reduced the minimum acceptable area the crack width decreased although the appearance of blobs in this situation, while when i increased minimum acceptable area and the blobs removed and the width increased
for example:
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 10;
% Read in image and convert to gray scale.
rgbImage = imread(‘7004-46.jpg’);
I = rgb2gray(rgbImage);
subplot(2,2,1);
imshow(I);
title(‘7004-46’);
% Take histogram.
subplot(2,2,2);
histogram(I);
grid on; %to make grid line
title(‘histogram Gray image’);
% Binarize image.
threshold = 145;
xline(threshold, ‘Color’, ‘r’, ‘LineWidth’,2)
mask=I < threshold;
mask = imfill(mask, ‘holes’);
% Filter image.
se = strel(‘line’,1, 0);
filteredImage = imclose(mask, se);
subplot(2, 2, 3);
imshow(filteredImage);
title(‘closed Image’);
%%% Measure the areas to determin minAcceptableArea show the histogram of
%%% area
% props = regionprops(filteredImage, ‘Area’);
% allAreas = sort([props.Area], ‘descend’);
% histogram(allAreas)
%%Look at the histogram. What area do you think is the minimum size to be a valid crack?
minAcceptableArea =20;
mask = bwareafilt(filteredImage, [minAcceptableArea, inf]);
subplot(2, 2, 4);
imshow(mask);
%
% % Measure size of crack.
props = regionprops(mask, ‘Area’);
allAreas = [props.Area];
out=bwferet(mask)
% Measure the areas to know the area not to be considered
% props = regionprops(mask, ‘Area’);
% allAreas = sort([props.Area], ‘descend’)
% Get width = area / maximum length
averageWidths = sort(allAreas ./ out.MaxDiameter, ‘descend’);
message = sprintf(‘The average width = %.2f pixels.’, averageWidths(1));
fprintf(‘%sn’, message);
caption = sprintf(‘Binary Image of Cracks larger than %dnAverage width of largest = %.2f pixels’, minAcceptableArea, averageWidths(1));
title(caption, ‘FontSize’, fontSize, ‘Interpreter’, ‘None’);
uiwait(helpdlg(message)); I noticed that when I reduced the minimum acceptable area the crack width decreased although the appearance of blobs in this situation, while when i increased minimum acceptable area and the blobs removed and the width increased
for example:
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 10;
% Read in image and convert to gray scale.
rgbImage = imread(‘7004-46.jpg’);
I = rgb2gray(rgbImage);
subplot(2,2,1);
imshow(I);
title(‘7004-46’);
% Take histogram.
subplot(2,2,2);
histogram(I);
grid on; %to make grid line
title(‘histogram Gray image’);
% Binarize image.
threshold = 145;
xline(threshold, ‘Color’, ‘r’, ‘LineWidth’,2)
mask=I < threshold;
mask = imfill(mask, ‘holes’);
% Filter image.
se = strel(‘line’,1, 0);
filteredImage = imclose(mask, se);
subplot(2, 2, 3);
imshow(filteredImage);
title(‘closed Image’);
%%% Measure the areas to determin minAcceptableArea show the histogram of
%%% area
% props = regionprops(filteredImage, ‘Area’);
% allAreas = sort([props.Area], ‘descend’);
% histogram(allAreas)
%%Look at the histogram. What area do you think is the minimum size to be a valid crack?
minAcceptableArea =20;
mask = bwareafilt(filteredImage, [minAcceptableArea, inf]);
subplot(2, 2, 4);
imshow(mask);
%
% % Measure size of crack.
props = regionprops(mask, ‘Area’);
allAreas = [props.Area];
out=bwferet(mask)
% Measure the areas to know the area not to be considered
% props = regionprops(mask, ‘Area’);
% allAreas = sort([props.Area], ‘descend’)
% Get width = area / maximum length
averageWidths = sort(allAreas ./ out.MaxDiameter, ‘descend’);
message = sprintf(‘The average width = %.2f pixels.’, averageWidths(1));
fprintf(‘%sn’, message);
caption = sprintf(‘Binary Image of Cracks larger than %dnAverage width of largest = %.2f pixels’, minAcceptableArea, averageWidths(1));
title(caption, ‘FontSize’, fontSize, ‘Interpreter’, ‘None’);
uiwait(helpdlg(message)); image analysis, image processing, image segmentation, crack, concrete, width, measures MATLAB Answers — New Questions