Month: August 2024
Invalid expression during a function handle
I am recieving the following error:
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
This is the line that is causing the error:
Kernel = @x q.*(exp(-jk.*(sqrt(a^2 + (m1 – (x)).^2)))./(4*pi.*((sqrt(a^2 + (m1 – (x)).^2)).^5)))*((1+jk.*(sqrt(a^2 + (m1 – (x)).^2))).*(2*((sqrt(a^2 + (m1 – (x)).^2)).^2)-3.*(a^2))+((k*a.*(sqrt(a^2 + (m1 – (x)).^2))).^2));
The following variables have already been defined prior to this line:
q, jk, m1, k and a. The only variable is x.
I counted the parentheses, checked the multiplication operator, and I am not trying to construct a matrix.
Some background context:
This line is within 2 for loops. When I take off the function handle (@x) and set x = 1, the code runs without any errors. I plan on integrating this Kernel function and pass it to an array. The original equation is q*(exp(-jk*R)/(4*pi*(R^5)))*((1+jk*R)*(2*(R^2)-3*(a^2))+((k*a*R)^2)) but since the variable X is within R, I expanded R at each instance. R = sqrt(a^2 + (m1 – m2)^2)
Thank you guys in advance!I am recieving the following error:
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
This is the line that is causing the error:
Kernel = @x q.*(exp(-jk.*(sqrt(a^2 + (m1 – (x)).^2)))./(4*pi.*((sqrt(a^2 + (m1 – (x)).^2)).^5)))*((1+jk.*(sqrt(a^2 + (m1 – (x)).^2))).*(2*((sqrt(a^2 + (m1 – (x)).^2)).^2)-3.*(a^2))+((k*a.*(sqrt(a^2 + (m1 – (x)).^2))).^2));
The following variables have already been defined prior to this line:
q, jk, m1, k and a. The only variable is x.
I counted the parentheses, checked the multiplication operator, and I am not trying to construct a matrix.
Some background context:
This line is within 2 for loops. When I take off the function handle (@x) and set x = 1, the code runs without any errors. I plan on integrating this Kernel function and pass it to an array. The original equation is q*(exp(-jk*R)/(4*pi*(R^5)))*((1+jk*R)*(2*(R^2)-3*(a^2))+((k*a*R)^2)) but since the variable X is within R, I expanded R at each instance. R = sqrt(a^2 + (m1 – m2)^2)
Thank you guys in advance! I am recieving the following error:
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
This is the line that is causing the error:
Kernel = @x q.*(exp(-jk.*(sqrt(a^2 + (m1 – (x)).^2)))./(4*pi.*((sqrt(a^2 + (m1 – (x)).^2)).^5)))*((1+jk.*(sqrt(a^2 + (m1 – (x)).^2))).*(2*((sqrt(a^2 + (m1 – (x)).^2)).^2)-3.*(a^2))+((k*a.*(sqrt(a^2 + (m1 – (x)).^2))).^2));
The following variables have already been defined prior to this line:
q, jk, m1, k and a. The only variable is x.
I counted the parentheses, checked the multiplication operator, and I am not trying to construct a matrix.
Some background context:
This line is within 2 for loops. When I take off the function handle (@x) and set x = 1, the code runs without any errors. I plan on integrating this Kernel function and pass it to an array. The original equation is q*(exp(-jk*R)/(4*pi*(R^5)))*((1+jk*R)*(2*(R^2)-3*(a^2))+((k*a*R)^2)) but since the variable X is within R, I expanded R at each instance. R = sqrt(a^2 + (m1 – m2)^2)
Thank you guys in advance! function, matlab function, integral MATLAB Answers — New Questions
Vlookup, Index, Match
Excel idiot here…..
In the pic below, on the sheet on the right, I am choosing two values in columns E and F from validation (reference the sheet on the left) and would like to return a value from a sheet on the left. i.e. If I choose “ELDC” and “OT Rate” on the right, I would like choose the proper value from the table on the left…in this case $31.76. Any help is appreciated!!!
Excel idiot here…..In the pic below, on the sheet on the right, I am choosing two values in columns E and F from validation (reference the sheet on the left) and would like to return a value from a sheet on the left. i.e. If I choose “ELDC” and “OT Rate” on the right, I would like choose the proper value from the table on the left…in this case $31.76. Any help is appreciated!!! Read More
Is it possible to cleanly decommission Windows CA?
So, I have a pain point I am currently dealing with. I joined the company I am with after the AD environment had already been established. There was a fair amount of turnover before I joined and part of that was that the previous System Admins were not thorough with documentation and they did things on a whim. To that, when I joined the PDC was also a CA that, as far as I could tell, was not actively being used by any systems other than the DCs to issue certs. The running theory is that the previous system admins were planning to use CA to do 802.1x type security for Wifi and VPN but never got around to completing the setup.
Obviously, it was not great that they installed the CA role onto the PDC. But I have since corrected that. I was able to extract the CA role and migrate it to a different server and I can see that it is able to issues certs to the DCs. (Looks like it has only issued Kerberos Authentication, DC Authentication, and Directory Email Replication certs since being migrated, and only on DCs). However, I don’t want the CA role around at all because it is one more server we have to maintain and we are not using it in any meaningful way.
I know there is documentation on how to actually decommission a CA from the network (How to decommission a Windows enterprise certification authority and remove all related objects ) but my question is; should/can I decommission it? Throughout my career, every time I have talked to another System Admin or gone through any training, I have always heard that I need to be extremely careful when deciding to add a CA role to a windows network. Because once it is established and issuing certs, it becomes next to impossible to fully/safely remove. Is that the case? Has anyone successfully removed a CA from their windows domain without breaking everything?
So, I have a pain point I am currently dealing with. I joined the company I am with after the AD environment had already been established. There was a fair amount of turnover before I joined and part of that was that the previous System Admins were not thorough with documentation and they did things on a whim. To that, when I joined the PDC was also a CA that, as far as I could tell, was not actively being used by any systems other than the DCs to issue certs. The running theory is that the previous system admins were planning to use CA to do 802.1x type security for Wifi and VPN but never got around to completing the setup. Obviously, it was not great that they installed the CA role onto the PDC. But I have since corrected that. I was able to extract the CA role and migrate it to a different server and I can see that it is able to issues certs to the DCs. (Looks like it has only issued Kerberos Authentication, DC Authentication, and Directory Email Replication certs since being migrated, and only on DCs). However, I don’t want the CA role around at all because it is one more server we have to maintain and we are not using it in any meaningful way. I know there is documentation on how to actually decommission a CA from the network (How to decommission a Windows enterprise certification authority and remove all related objects ) but my question is; should/can I decommission it? Throughout my career, every time I have talked to another System Admin or gone through any training, I have always heard that I need to be extremely careful when deciding to add a CA role to a windows network. Because once it is established and issuing certs, it becomes next to impossible to fully/safely remove. Is that the case? Has anyone successfully removed a CA from their windows domain without breaking everything? Read More
Need Ability to Force Native Resolution on Remote Desktop HTML5 Web Client
Hello,
Not sure if this forum is also for the HTML 5 RD web client but if so, I’d like to request a feature or ask if there’s a way to force the clients to use native resolution. We can force it to use web (vs .RDP) and suppress telemetry but not the native resolution slider. I tried a few DWORDS in HKLMSoftwareMicrosoftRemoteDesktopWeb but no luck.
When we roll this out to hundreds of users, they’ll all have to check that box. Would be nice if we could force it on the admin side with a reg key or the Set-RDWebClientDeploymentSetting cmdlet.
thanks,
Dan
Hello, Not sure if this forum is also for the HTML 5 RD web client but if so, I’d like to request a feature or ask if there’s a way to force the clients to use native resolution. We can force it to use web (vs .RDP) and suppress telemetry but not the native resolution slider. I tried a few DWORDS in HKLMSoftwareMicrosoftRemoteDesktopWeb but no luck. When we roll this out to hundreds of users, they’ll all have to check that box. Would be nice if we could force it on the admin side with a reg key or the Set-RDWebClientDeploymentSetting cmdlet. thanks,Dan Read More
Formula trouble
I want to do this thing, but I have no idea where to start or what type of formulas to try:
I’m tracking evaluations in my company
Column E is the type of evaluation: Initial F, and Initial E.
Column G is the date their evaluation process was initiated
Column H is the date their evaluation process closes out.
People designated “Initial F” in column E have a close out date (Column H) that is 60 days after their initiation date (Column G)
People designated “Initial E” in column E have a close out date (Column H) that is 45 days after their initiation date (Column G)
I want column H to automatically generate a date that is respectively, 45 or 60 days after the date in column G based on the condition in column E.
I want to do this thing, but I have no idea where to start or what type of formulas to try:I’m tracking evaluations in my company Column E is the type of evaluation: Initial F, and Initial E. Column G is the date their evaluation process was initiatedColumn H is the date their evaluation process closes out. People designated “Initial F” in column E have a close out date (Column H) that is 60 days after their initiation date (Column G)People designated “Initial E” in column E have a close out date (Column H) that is 45 days after their initiation date (Column G) I want column H to automatically generate a date that is respectively, 45 or 60 days after the date in column G based on the condition in column E. Read More
Bookings Emails Deleting automatically
I am an IT admin for Bookings at our organization. One of our staff members noticed her Bookings meeting confirmations are automatically directed to her trash. I assume this is because the meeting invite is accepted automatically on her behalf. Unfortunately, pertinent information is on those emails (such as notes and customer responses). We have tried to make mailbox rules as well as toggle “ignored” emails off but to no avail. Please advise.
I am an IT admin for Bookings at our organization. One of our staff members noticed her Bookings meeting confirmations are automatically directed to her trash. I assume this is because the meeting invite is accepted automatically on her behalf. Unfortunately, pertinent information is on those emails (such as notes and customer responses). We have tried to make mailbox rules as well as toggle “ignored” emails off but to no avail. Please advise. Read More
Formula to autofill a PO #
I have a workbook with 2 sheets.
Sheet 1, column A is where the formula needs to go – based off the information in the sheet called Customer list.
Example: Customer List – Column A is customer name – Column B is the PO# Starting String. This is specific to the customer.
I want to open Sheet 1 and type a customer name in B2 and a PO number automatically fill in based off the criteria mentioned above. So if my Customer name is Asset Living (on sheet: Customer List – A2) and I type Asset Living in Sheet 1, B2, the the PO# that populates in Sheet 1 A2 should be AL(from Customer List, B2) followed by random numbers (preferrably 3 digits).
I have a workbook with 2 sheets.Sheet 1, column A is where the formula needs to go – based off the information in the sheet called Customer list.Example: Customer List – Column A is customer name – Column B is the PO# Starting String. This is specific to the customer.I want to open Sheet 1 and type a customer name in B2 and a PO number automatically fill in based off the criteria mentioned above. So if my Customer name is Asset Living (on sheet: Customer List – A2) and I type Asset Living in Sheet 1, B2, the the PO# that populates in Sheet 1 A2 should be AL(from Customer List, B2) followed by random numbers (preferrably 3 digits). Read More
xlookup with table issue
Hello!
I am working on a file that requires use of xlookup. to keep things organized and for ease of reviewal, i use the table headers in the formulas (instead of just column letter). I realized that my formulas are not working properly. when I set the formula up, it only seems to return the value that appears first in the lookup array.
For example, I am trying to find and return three different things: call them A, B, and C. In the table that I am doing the lookup from, if A, B, and C are listed in that order, then my lookups will only have one that works, and it will return A. During trouble shooting, I deleted the rows that had A and B, leaving only C. Once I did this, the C was the first lookup value in the lookup table, and the formula worked (it returned C). This informs me that it is not an error of difference of spelling / spaces / etc. in lookup value and items in lookup array.
Also during troubleshooting, I used the column letters as opposed to the table header names in the formula, and it worked perfect.
Has anyone experienced this before / does anyone have any tips???
Hello! I am working on a file that requires use of xlookup. to keep things organized and for ease of reviewal, i use the table headers in the formulas (instead of just column letter). I realized that my formulas are not working properly. when I set the formula up, it only seems to return the value that appears first in the lookup array. For example, I am trying to find and return three different things: call them A, B, and C. In the table that I am doing the lookup from, if A, B, and C are listed in that order, then my lookups will only have one that works, and it will return A. During trouble shooting, I deleted the rows that had A and B, leaving only C. Once I did this, the C was the first lookup value in the lookup table, and the formula worked (it returned C). This informs me that it is not an error of difference of spelling / spaces / etc. in lookup value and items in lookup array. Also during troubleshooting, I used the column letters as opposed to the table header names in the formula, and it worked perfect. Has anyone experienced this before / does anyone have any tips??? Read More
Drive Encryption through Endpoint Security no longer showing option to backup information in Entra
Hi All – Just want to check with Community members if others are seeing similar while configuring Drive Encryption under Endpoint Security in Intune. Can see option to save BitLocker recovery information in AD DS but not in Microsoft Entra ID. Is this a bug?
Hi All – Just want to check with Community members if others are seeing similar while configuring Drive Encryption under Endpoint Security in Intune. Can see option to save BitLocker recovery information in AD DS but not in Microsoft Entra ID. Is this a bug? Read More
Improve your forms with Copilot suggestions
Copilot has always been helpful at crafting forms and fine-tuning questions. Now, it also serves as an intelligent assistant throughout your journey, offering additional smart suggestions. By using these tips, you can make your form/quiz more attractive and easier to complete, leading to better results with less effort. Let’s check it now!
How to activate
For any newly created or existing forms/quizzes, a banner at the top will remind you that Copilot has suggestions for you. You can just click ‘View’ to check the details.
Theme suggestion
Responder’s first impression of your form is crucial, and a visually appealing design can certainly capture their attention. Copilot will start by offering several theme options based on your topic, helping you choose a look that grabs their interest.
Setting suggestion
Based on your content, Copilot will suggest settings to make your form more effective. For example, it might remind you to allow responders to save and edit their responses for more accurate feedback or set a timer for improved time management.
Distribution suggestion
Additionally, Copilot will guide you through sending out your form to help you gather more responses. Without needing to open ‘Collect Responses,’ Copilot will draft a personalized message to boost responses and help set the appropriate permissions. You only need to enter the responders’ details and send out the form.
Copilot in Forms assistant will start rolling out to commercial users (including Enterprise, SMB and EDU) in late July 2024. A Copilot for Microsoft 365 license is required to access Copilot in Forms. Discover more about Copilot for Microsoft 365 here.
Microsoft Tech Community – Latest Blogs –Read More
Panamorfi: A New Discord DDoS Campaign
Aqua Nautilus researchers uncovered a new Distributed Denial of Service (DDoS) campaign dubbed ‘Panamorfi’, utilizing the Java written minecraft DDoS package – mineping – the threat actor launches a DDoS. Thus far we’ve only seen it deployed via misconfigured Jupyter notebooks. In this blog we explain about this attack, the techniques used by the threat actor and how to protect your environments.
Aqua Nautilus researchers uncovered a new Distributed Denial of Service (DDoS) campaign dubbed ‘Panamorfi’, utilizing the Java written minecraft DDoS package – mineping – the threat actor launches a DDoS. Thus far we’ve only seen it deployed via misconfigured Jupyter notebooks. In this blog we explain about this attack, the techniques used by the threat actor and how to protect your environments.Read More
How to iteratively go through a structure?
I have some data from 100 different tests that I ran. There are 2 variables that were swept through for 10 values each, resulting in 100 tests (i.e. variable 1 is A with 10 elements, variable 2 is B with 10 elements, my test data is from all the permutations of A and B). A few timeseries measurements are made for each test. I have my data saved in a structure like:
Data.A1.B1.meas1
Data.A1.B1.meas2
%…
Data.A1.B1.measN
Data.A1.B2.meas1
Data.A1.B2.meas2
%…
Data.A2.B1.meas1
%…
Data.A10.B10.measN
I need to take the mean of the timeseries data for each test. Is there some way to set up a loop such that I can easily iterate through the struct to do this? Some thing like:
for i = 1:10
for j = 1:10
DataMean = mean(Data.A(i).B(j).meas1)
end
end
Is there a more efficient way to structure the data to make this easier?I have some data from 100 different tests that I ran. There are 2 variables that were swept through for 10 values each, resulting in 100 tests (i.e. variable 1 is A with 10 elements, variable 2 is B with 10 elements, my test data is from all the permutations of A and B). A few timeseries measurements are made for each test. I have my data saved in a structure like:
Data.A1.B1.meas1
Data.A1.B1.meas2
%…
Data.A1.B1.measN
Data.A1.B2.meas1
Data.A1.B2.meas2
%…
Data.A2.B1.meas1
%…
Data.A10.B10.measN
I need to take the mean of the timeseries data for each test. Is there some way to set up a loop such that I can easily iterate through the struct to do this? Some thing like:
for i = 1:10
for j = 1:10
DataMean = mean(Data.A(i).B(j).meas1)
end
end
Is there a more efficient way to structure the data to make this easier? I have some data from 100 different tests that I ran. There are 2 variables that were swept through for 10 values each, resulting in 100 tests (i.e. variable 1 is A with 10 elements, variable 2 is B with 10 elements, my test data is from all the permutations of A and B). A few timeseries measurements are made for each test. I have my data saved in a structure like:
Data.A1.B1.meas1
Data.A1.B1.meas2
%…
Data.A1.B1.measN
Data.A1.B2.meas1
Data.A1.B2.meas2
%…
Data.A2.B1.meas1
%…
Data.A10.B10.measN
I need to take the mean of the timeseries data for each test. Is there some way to set up a loop such that I can easily iterate through the struct to do this? Some thing like:
for i = 1:10
for j = 1:10
DataMean = mean(Data.A(i).B(j).meas1)
end
end
Is there a more efficient way to structure the data to make this easier? structures, loops MATLAB Answers — New Questions
Save numbers after text pattern in a vector
Dear all
I have a text file that looks like these:
#——————————————————
# Atomistic spin configuration file for vampire v5+
#——————————————————
# Date: Wed Jul 31 19:19:54 2024
#——————————————————
Time: 1e-15
Field: 0 0 0
Temperature: 0.05
Magnetisation: -0.999883 0.0152572 -0.000478932
#——————————————————
Number of spin files: 1
spins-00000000.data
#——————————————————
I am interested in saving in an array the three numerical values after "Field:". I have tried something like
field_str=regexp(meta_file_read,'(?<=^TField:s+)(S+)s*(S+)s*(S+)’,’match’,’lineanchors’); % T
But the cell seems to be empty.
Any ideas?Dear all
I have a text file that looks like these:
#——————————————————
# Atomistic spin configuration file for vampire v5+
#——————————————————
# Date: Wed Jul 31 19:19:54 2024
#——————————————————
Time: 1e-15
Field: 0 0 0
Temperature: 0.05
Magnetisation: -0.999883 0.0152572 -0.000478932
#——————————————————
Number of spin files: 1
spins-00000000.data
#——————————————————
I am interested in saving in an array the three numerical values after "Field:". I have tried something like
field_str=regexp(meta_file_read,'(?<=^TField:s+)(S+)s*(S+)s*(S+)’,’match’,’lineanchors’); % T
But the cell seems to be empty.
Any ideas? Dear all
I have a text file that looks like these:
#——————————————————
# Atomistic spin configuration file for vampire v5+
#——————————————————
# Date: Wed Jul 31 19:19:54 2024
#——————————————————
Time: 1e-15
Field: 0 0 0
Temperature: 0.05
Magnetisation: -0.999883 0.0152572 -0.000478932
#——————————————————
Number of spin files: 1
spins-00000000.data
#——————————————————
I am interested in saving in an array the three numerical values after "Field:". I have tried something like
field_str=regexp(meta_file_read,'(?<=^TField:s+)(S+)s*(S+)s*(S+)’,’match’,’lineanchors’); % T
But the cell seems to be empty.
Any ideas? text patterns MATLAB Answers — New Questions
how to make subscripts in plot labeling
Hello
I have a plot as shown below. However i wantet to make the x and y labeling in subscript
forexample in the x and y label 1 next to K should be subscripted
Thank you for your helpHello
I have a plot as shown below. However i wantet to make the x and y labeling in subscript
forexample in the x and y label 1 next to K should be subscripted
Thank you for your help Hello
I have a plot as shown below. However i wantet to make the x and y labeling in subscript
forexample in the x and y label 1 next to K should be subscripted
Thank you for your help labeling MATLAB Answers — New Questions
Standalone App will not install without internet
I am trying to run the installer for a standalone app that was compiled with the option to download runtime engine from web. However what I would like to do is have the runtime engine installed on the target computer in advance. This computer is not connected to the internet. When I try to run the app installer on this computer, I get an error since the computer is not connected to the internet. It does not even try to check if the runtime engine is already installed on the computer.
I don’t want to compile the installer that contains the runtime engine, since that is a very large file and takes a long time to compile each time. Is there a way to configure the app installer so that
1) I don’t need to include the entire runtime engine with it
2) The target computer does not need to be connected to the internet during installation?I am trying to run the installer for a standalone app that was compiled with the option to download runtime engine from web. However what I would like to do is have the runtime engine installed on the target computer in advance. This computer is not connected to the internet. When I try to run the app installer on this computer, I get an error since the computer is not connected to the internet. It does not even try to check if the runtime engine is already installed on the computer.
I don’t want to compile the installer that contains the runtime engine, since that is a very large file and takes a long time to compile each time. Is there a way to configure the app installer so that
1) I don’t need to include the entire runtime engine with it
2) The target computer does not need to be connected to the internet during installation? I am trying to run the installer for a standalone app that was compiled with the option to download runtime engine from web. However what I would like to do is have the runtime engine installed on the target computer in advance. This computer is not connected to the internet. When I try to run the app installer on this computer, I get an error since the computer is not connected to the internet. It does not even try to check if the runtime engine is already installed on the computer.
I don’t want to compile the installer that contains the runtime engine, since that is a very large file and takes a long time to compile each time. Is there a way to configure the app installer so that
1) I don’t need to include the entire runtime engine with it
2) The target computer does not need to be connected to the internet during installation? app designer, compiler MATLAB Answers — New Questions
Showing the error “Variable nDimes has an incorrect value”
For this problem your code will need to do the following:
Accurately determine the number of each coin type present. Use variable names nDimes, nNickels, nQuarters, and nFiftyCents.
Calculate the total $ value of coins present. Use variable name USD
The code:
testImageIdx = randi([1,3]);
testCoinImage = imread("testCoinImage" + testImageIdx + ".png");
imshow(testCoinImage);
title("Original Coin Image");
[testcoinMask, MaskedtestCoin] = segmentCoin(testCoinImage);
se = strel(‘disk’, 20, 0);
testCoinMask = imfill(testcoinMask, ‘holes’);
testCoinMask = imerode(testcoinMask, se);
imgFilt = imgaussfilt(MaskedtestCoin, 0.5, ‘Padding’, "circular", ‘FilterDomain’, "frequency", ‘FilterSize’, 3);
faceEdgeMask = edge(imgFilt, "sobel", 0.05, "both");
faceEdgeMask(~testcoinMask) = false;
imshow(faceEdgeMask);
title("Edge Mask Detection for Valid Coins");
see = strel("disk", 25, 0);
fb = imfill(faceEdgeMask, "holes");
Bw2 = imdilate(fb, see);
validCoinMask = Bw2 & testcoinMask;
set = strel("disk", 2, 0);
validCoinMask = imdilate(validCoinMask, set);
montage({testcoinMask, validCoinMask});
title("testcoinMask vs ValidCoinMask");
coinSizes = regionprops("table", validCoinMask, "Area");
nDimes = coinSizes.Area < 1100;
nDimes = sum(nDimes);
nNickels = (coinSizes.Area > 1100 & coinSizes.Area < 2200);
nNickels = sum(nNickels);
nQuarters = (coinSizes.Area > 2200 & coinSizes.Area < 3200);
nQuarters = sum(nQuarters);
nFiftyCents = coinSizes.Area >= 3200;
nFiftyCents = sum(nFiftyCents);
USD = (nDimes * 0.10) + (nNickels * 0.05) + (nQuarters * 0.25) + (nFiftyCents * 0.50);
function [testcoinMask, MaskedtestCoin] = segmentCoin(X)
X = im2gray(X);
testcoinMask = im2gray(X) > 150;
radius = 12;
decomp = 4;
se = strel(‘disk’, radius, decomp);
testcoinMask = imclose(testcoinMask, se);
MaskedtestCoin = X;
MaskedtestCoin(~testcoinMask) = 0;
endFor this problem your code will need to do the following:
Accurately determine the number of each coin type present. Use variable names nDimes, nNickels, nQuarters, and nFiftyCents.
Calculate the total $ value of coins present. Use variable name USD
The code:
testImageIdx = randi([1,3]);
testCoinImage = imread("testCoinImage" + testImageIdx + ".png");
imshow(testCoinImage);
title("Original Coin Image");
[testcoinMask, MaskedtestCoin] = segmentCoin(testCoinImage);
se = strel(‘disk’, 20, 0);
testCoinMask = imfill(testcoinMask, ‘holes’);
testCoinMask = imerode(testcoinMask, se);
imgFilt = imgaussfilt(MaskedtestCoin, 0.5, ‘Padding’, "circular", ‘FilterDomain’, "frequency", ‘FilterSize’, 3);
faceEdgeMask = edge(imgFilt, "sobel", 0.05, "both");
faceEdgeMask(~testcoinMask) = false;
imshow(faceEdgeMask);
title("Edge Mask Detection for Valid Coins");
see = strel("disk", 25, 0);
fb = imfill(faceEdgeMask, "holes");
Bw2 = imdilate(fb, see);
validCoinMask = Bw2 & testcoinMask;
set = strel("disk", 2, 0);
validCoinMask = imdilate(validCoinMask, set);
montage({testcoinMask, validCoinMask});
title("testcoinMask vs ValidCoinMask");
coinSizes = regionprops("table", validCoinMask, "Area");
nDimes = coinSizes.Area < 1100;
nDimes = sum(nDimes);
nNickels = (coinSizes.Area > 1100 & coinSizes.Area < 2200);
nNickels = sum(nNickels);
nQuarters = (coinSizes.Area > 2200 & coinSizes.Area < 3200);
nQuarters = sum(nQuarters);
nFiftyCents = coinSizes.Area >= 3200;
nFiftyCents = sum(nFiftyCents);
USD = (nDimes * 0.10) + (nNickels * 0.05) + (nQuarters * 0.25) + (nFiftyCents * 0.50);
function [testcoinMask, MaskedtestCoin] = segmentCoin(X)
X = im2gray(X);
testcoinMask = im2gray(X) > 150;
radius = 12;
decomp = 4;
se = strel(‘disk’, radius, decomp);
testcoinMask = imclose(testcoinMask, se);
MaskedtestCoin = X;
MaskedtestCoin(~testcoinMask) = 0;
end For this problem your code will need to do the following:
Accurately determine the number of each coin type present. Use variable names nDimes, nNickels, nQuarters, and nFiftyCents.
Calculate the total $ value of coins present. Use variable name USD
The code:
testImageIdx = randi([1,3]);
testCoinImage = imread("testCoinImage" + testImageIdx + ".png");
imshow(testCoinImage);
title("Original Coin Image");
[testcoinMask, MaskedtestCoin] = segmentCoin(testCoinImage);
se = strel(‘disk’, 20, 0);
testCoinMask = imfill(testcoinMask, ‘holes’);
testCoinMask = imerode(testcoinMask, se);
imgFilt = imgaussfilt(MaskedtestCoin, 0.5, ‘Padding’, "circular", ‘FilterDomain’, "frequency", ‘FilterSize’, 3);
faceEdgeMask = edge(imgFilt, "sobel", 0.05, "both");
faceEdgeMask(~testcoinMask) = false;
imshow(faceEdgeMask);
title("Edge Mask Detection for Valid Coins");
see = strel("disk", 25, 0);
fb = imfill(faceEdgeMask, "holes");
Bw2 = imdilate(fb, see);
validCoinMask = Bw2 & testcoinMask;
set = strel("disk", 2, 0);
validCoinMask = imdilate(validCoinMask, set);
montage({testcoinMask, validCoinMask});
title("testcoinMask vs ValidCoinMask");
coinSizes = regionprops("table", validCoinMask, "Area");
nDimes = coinSizes.Area < 1100;
nDimes = sum(nDimes);
nNickels = (coinSizes.Area > 1100 & coinSizes.Area < 2200);
nNickels = sum(nNickels);
nQuarters = (coinSizes.Area > 2200 & coinSizes.Area < 3200);
nQuarters = sum(nQuarters);
nFiftyCents = coinSizes.Area >= 3200;
nFiftyCents = sum(nFiftyCents);
USD = (nDimes * 0.10) + (nNickels * 0.05) + (nQuarters * 0.25) + (nFiftyCents * 0.50);
function [testcoinMask, MaskedtestCoin] = segmentCoin(X)
X = im2gray(X);
testcoinMask = im2gray(X) > 150;
radius = 12;
decomp = 4;
se = strel(‘disk’, radius, decomp);
testcoinMask = imclose(testcoinMask, se);
MaskedtestCoin = X;
MaskedtestCoin(~testcoinMask) = 0;
end image processing, image segmentation, image analysis MATLAB Answers — New Questions
Deleted Teams App still being looked for on startup
Hi Everyone, we have a puzzling one, we published and subsequently deleted an App from our Teams portal. all users now get a message saying that the app can’t be found and we’re struggling with how to remedy this. The app is 100% gone from the portal. we have tried uninstall and reinstall of teams including deleting the cache, but this has not helped at all. Has anyone any idea of where to look to resolve this one – I think there’s something somewhere in the teams portal but can’t fine anything.
Kind Regards
Pete
Hi Everyone, we have a puzzling one, we published and subsequently deleted an App from our Teams portal. all users now get a message saying that the app can’t be found and we’re struggling with how to remedy this. The app is 100% gone from the portal. we have tried uninstall and reinstall of teams including deleting the cache, but this has not helped at all. Has anyone any idea of where to look to resolve this one – I think there’s something somewhere in the teams portal but can’t fine anything. Kind Regards Pete Read More
Public preview checkbox keeps unchecking
Hi 🙂
When I tick the ‘Public preview’ box within settings, it is not clear if this instantly changes to the preview version or if it needs a restart. In Classic Teams, enabling public preview used to relaunch the app.
In addition, the checkbox also regularly shows as unticked. I suspect this is happening after Teams updates (which it does a few times a day sometimes).
Does anyone else notice this? I would like to stay in preview mode the majority of the time, but at the least until I choose to turn it off. With this current way of working I am often taken out of it without being notified.
Thanks,
Ian
Hi :)When I tick the ‘Public preview’ box within settings, it is not clear if this instantly changes to the preview version or if it needs a restart. In Classic Teams, enabling public preview used to relaunch the app. In addition, the checkbox also regularly shows as unticked. I suspect this is happening after Teams updates (which it does a few times a day sometimes). Does anyone else notice this? I would like to stay in preview mode the majority of the time, but at the least until I choose to turn it off. With this current way of working I am often taken out of it without being notified. Thanks,Ian Read More
Azure Devops Teams Notification
Hello Team,
I have recently added Azure Repo app to my dev release channel. I configured “@Azure Repos subscriptions” and added notification for when a Pull Request is created. Is there a way I can exclude draft Pull Requests from sending notifications?
Hello Team, I have recently added Azure Repo app to my dev release channel. I configured “@Azure Repos subscriptions” and added notification for when a Pull Request is created. Is there a way I can exclude draft Pull Requests from sending notifications? Read More