Month: June 2024
Image Denoising of SEM Image
Hello,
I am trying to analyse microstructural features in one of my image. Yet I have couple of problems on the image. First of all, one of my friends has denoised the image using python and he did not share the details of denosising. When I try to denoise image by myself, I cannot get close to his denosising so I am wodering what I should do and what he used for denoising so that he got such a clear image. I have added the image before and after denosising (hope you can see the zip file).
Also another question is that I was using the thresholded image to measure microstructural features like length, width and volume fraction of yellow and chunky purple ones via imageJ and python. I am wondering if I can do the same with Matlab in a better way. I know my thresholding could be better but with limited coding skills that is what I can do currently 🙂 So next question is how I can do a better thresholding to distinguish each phases which are gray, white and black in the original image
Thank you in advance.Hello,
I am trying to analyse microstructural features in one of my image. Yet I have couple of problems on the image. First of all, one of my friends has denoised the image using python and he did not share the details of denosising. When I try to denoise image by myself, I cannot get close to his denosising so I am wodering what I should do and what he used for denoising so that he got such a clear image. I have added the image before and after denosising (hope you can see the zip file).
Also another question is that I was using the thresholded image to measure microstructural features like length, width and volume fraction of yellow and chunky purple ones via imageJ and python. I am wondering if I can do the same with Matlab in a better way. I know my thresholding could be better but with limited coding skills that is what I can do currently 🙂 So next question is how I can do a better thresholding to distinguish each phases which are gray, white and black in the original image
Thank you in advance. Hello,
I am trying to analyse microstructural features in one of my image. Yet I have couple of problems on the image. First of all, one of my friends has denoised the image using python and he did not share the details of denosising. When I try to denoise image by myself, I cannot get close to his denosising so I am wodering what I should do and what he used for denoising so that he got such a clear image. I have added the image before and after denosising (hope you can see the zip file).
Also another question is that I was using the thresholded image to measure microstructural features like length, width and volume fraction of yellow and chunky purple ones via imageJ and python. I am wondering if I can do the same with Matlab in a better way. I know my thresholding could be better but with limited coding skills that is what I can do currently 🙂 So next question is how I can do a better thresholding to distinguish each phases which are gray, white and black in the original image
Thank you in advance. image analysis, image processing MATLAB Answers — New Questions
How do I fix/find this error when using OSPREY?
I’m trying to us OSPREY to process MRS data, I get through the steps "load data" and "process data" but I keep getting this error when I try to move on to "model data" step.
Reference to non-existent field ‘np_sw_2048_2999.4001’.
Error in osp_plotModule (line 426)
basisSet = MRSCont.fit.resBasisSet.(which).([‘np_sw_’ num2str(MRSCont.processed.metab{kk}.sz(1)) ‘_’
num2str(MRSCont.processed.metab{kk}.spectralwidth)]){basis,1,subspectrum};
Error in osp_plotAllPDF (line 76)
osp_plotModule(MRSCont, ‘OspreyFit’, kk,[bb ss], Names{mm});
Error in OspreyFit (line 235)
osp_plotAllPDF(MRSCont, ‘OspreyFit’);
Error in osp_onFit (line 35)
MRSCont = OspreyFit(MRSCont);
Error while evaluating UIControl Callback.I’m trying to us OSPREY to process MRS data, I get through the steps "load data" and "process data" but I keep getting this error when I try to move on to "model data" step.
Reference to non-existent field ‘np_sw_2048_2999.4001’.
Error in osp_plotModule (line 426)
basisSet = MRSCont.fit.resBasisSet.(which).([‘np_sw_’ num2str(MRSCont.processed.metab{kk}.sz(1)) ‘_’
num2str(MRSCont.processed.metab{kk}.spectralwidth)]){basis,1,subspectrum};
Error in osp_plotAllPDF (line 76)
osp_plotModule(MRSCont, ‘OspreyFit’, kk,[bb ss], Names{mm});
Error in OspreyFit (line 235)
osp_plotAllPDF(MRSCont, ‘OspreyFit’);
Error in osp_onFit (line 35)
MRSCont = OspreyFit(MRSCont);
Error while evaluating UIControl Callback. I’m trying to us OSPREY to process MRS data, I get through the steps "load data" and "process data" but I keep getting this error when I try to move on to "model data" step.
Reference to non-existent field ‘np_sw_2048_2999.4001’.
Error in osp_plotModule (line 426)
basisSet = MRSCont.fit.resBasisSet.(which).([‘np_sw_’ num2str(MRSCont.processed.metab{kk}.sz(1)) ‘_’
num2str(MRSCont.processed.metab{kk}.spectralwidth)]){basis,1,subspectrum};
Error in osp_plotAllPDF (line 76)
osp_plotModule(MRSCont, ‘OspreyFit’, kk,[bb ss], Names{mm});
Error in OspreyFit (line 235)
osp_plotAllPDF(MRSCont, ‘OspreyFit’);
Error in osp_onFit (line 35)
MRSCont = OspreyFit(MRSCont);
Error while evaluating UIControl Callback. osprey, mrs, matlab MATLAB Answers — New Questions
Internal Emails Being Quarantined?
Hi everyone,
One client org has internal emails being caught in the Microsoft Defender Quarantine on O365. They also have external emails being caught there and it seems that these days we cannot even whitelist email addresses any longer, we have to submit them to Microsoft so Microsoft can EVENTUALLY improve the filter?
Client is going crazy as many important vendor emails are getting caught and they just want to change from Microsoft somewhere else which I’m trying to not recommend.
It does suck, understandably to have your email domain hosted on O365 for a dozen+ years and to have the Spam filter act as if it’s brand new sometimes on a yearly basis however. It’s very inconvenient for productivity reasons as lots of false-positives start happening over and over as if the filter is brand new now and then.
I have tried to set the quarantine to “send an email daily” to user so they can handle their own quarantine, that hasn’t worked, no email arrives. So I have given the users the link to login to their quarnatine to try to release/report false-positive’s to Microsoft meanwhile.
Any suggestions to improve this?
Thanks.
Hi everyone, One client org has internal emails being caught in the Microsoft Defender Quarantine on O365. They also have external emails being caught there and it seems that these days we cannot even whitelist email addresses any longer, we have to submit them to Microsoft so Microsoft can EVENTUALLY improve the filter? Client is going crazy as many important vendor emails are getting caught and they just want to change from Microsoft somewhere else which I’m trying to not recommend. It does suck, understandably to have your email domain hosted on O365 for a dozen+ years and to have the Spam filter act as if it’s brand new sometimes on a yearly basis however. It’s very inconvenient for productivity reasons as lots of false-positives start happening over and over as if the filter is brand new now and then. I have tried to set the quarantine to “send an email daily” to user so they can handle their own quarantine, that hasn’t worked, no email arrives. So I have given the users the link to login to their quarnatine to try to release/report false-positive’s to Microsoft meanwhile. Any suggestions to improve this? Thanks. Read More
How to deselect a cell on uitable using CellSelectionCallback?
Hi,
Tried several solutions found in the forum but none of them worked,
in my program, when a cell is selected, all the info of the row is displayed in different edit cases, when the cell in the uitable is edited and enter is pressed, the wanted value changes properly but the CellSelectionCallback is called again and the indices this time are inexistent and returns an error.
Any way of fixing this?
Thanks in advanceHi,
Tried several solutions found in the forum but none of them worked,
in my program, when a cell is selected, all the info of the row is displayed in different edit cases, when the cell in the uitable is edited and enter is pressed, the wanted value changes properly but the CellSelectionCallback is called again and the indices this time are inexistent and returns an error.
Any way of fixing this?
Thanks in advance Hi,
Tried several solutions found in the forum but none of them worked,
in my program, when a cell is selected, all the info of the row is displayed in different edit cases, when the cell in the uitable is edited and enter is pressed, the wanted value changes properly but the CellSelectionCallback is called again and the indices this time are inexistent and returns an error.
Any way of fixing this?
Thanks in advance deselect MATLAB Answers — New Questions
How to delete default excel sheets when using writetable function (mac)?
When using the writetable function to add several different sheets, excel generates default (blank) excel sheets at the beginning of the document. I currently am working off a mac computer and thus cannot use the actxserver solutions described in other posts.
writetable(T,filename,’sheet’,’sheet_name’);When using the writetable function to add several different sheets, excel generates default (blank) excel sheets at the beginning of the document. I currently am working off a mac computer and thus cannot use the actxserver solutions described in other posts.
writetable(T,filename,’sheet’,’sheet_name’); When using the writetable function to add several different sheets, excel generates default (blank) excel sheets at the beginning of the document. I currently am working off a mac computer and thus cannot use the actxserver solutions described in other posts.
writetable(T,filename,’sheet’,’sheet_name’); writetable, excel, sheets MATLAB Answers — New Questions
Modifying Loss Function for Deep Reinforcement Learning Agent
Hi.
Im Looking to use the DQN agent for some initial study of a problem that Im working on. The problem requires that I modify the loss function used in training of the Q-approximation network in DQN. I have the equation that I need to use to modify the loss function, it will be an additional term added to the standard loss function, which is squares sum of target and predicted Q network values. The new term will be like sum of squares of predicted and some expert Q value.
I would like to know if its possible to just modify the loss function, add the new term, and still use the framework presented by Reinforcement Learning Toolbox? Or this is not possible and I would have to atleast write all the code for DQN agents learning part?
Thanks for your time and help!Hi.
Im Looking to use the DQN agent for some initial study of a problem that Im working on. The problem requires that I modify the loss function used in training of the Q-approximation network in DQN. I have the equation that I need to use to modify the loss function, it will be an additional term added to the standard loss function, which is squares sum of target and predicted Q network values. The new term will be like sum of squares of predicted and some expert Q value.
I would like to know if its possible to just modify the loss function, add the new term, and still use the framework presented by Reinforcement Learning Toolbox? Or this is not possible and I would have to atleast write all the code for DQN agents learning part?
Thanks for your time and help! Hi.
Im Looking to use the DQN agent for some initial study of a problem that Im working on. The problem requires that I modify the loss function used in training of the Q-approximation network in DQN. I have the equation that I need to use to modify the loss function, it will be an additional term added to the standard loss function, which is squares sum of target and predicted Q network values. The new term will be like sum of squares of predicted and some expert Q value.
I would like to know if its possible to just modify the loss function, add the new term, and still use the framework presented by Reinforcement Learning Toolbox? Or this is not possible and I would have to atleast write all the code for DQN agents learning part?
Thanks for your time and help! reinforcement learning, loss function, dqn MATLAB Answers — New Questions
Create a shared mailbox for unlicensed global admin user
Hi,
I have created an unlicensed user to be a global admin because paying for a license would be a waste of money since it is meant to manage only. However, I noticed that Microsoft frequently sends communications to this user (e.g., billing emails, or if I submit a tech support ticket, etc.). Therefore, I decided that this user needs a corresponding mailbox to receive all these emails, and then delegate access to this inbox to appropriate users.
Unfortunately, this process has turned out to be quite challenging. I can create a new shared mailbox, which creates an unlicensed user, but it is not allowing me to change or reassign the names and put the two together. The new Exchange admin center is not letting me create a mailbox there, and when I try modifying the SMTP address, it gives an error related to Azure Directory and does not change anything.
I hope someone can help me accomplish adding a shared mailbox to an existing unlicensed user.
Thank you.
Hi, I have created an unlicensed user to be a global admin because paying for a license would be a waste of money since it is meant to manage only. However, I noticed that Microsoft frequently sends communications to this user (e.g., billing emails, or if I submit a tech support ticket, etc.). Therefore, I decided that this user needs a corresponding mailbox to receive all these emails, and then delegate access to this inbox to appropriate users. Unfortunately, this process has turned out to be quite challenging. I can create a new shared mailbox, which creates an unlicensed user, but it is not allowing me to change or reassign the names and put the two together. The new Exchange admin center is not letting me create a mailbox there, and when I try modifying the SMTP address, it gives an error related to Azure Directory and does not change anything. I hope someone can help me accomplish adding a shared mailbox to an existing unlicensed user. Thank you. Read More
Is Microsoft trying to get people scammed? New Outlook is insideous.
The new outlook was forced on me a couple of days ago. I’ve got some decent gripes with it but the biggest issue I have is it seems to be funneling less astute users to getting scammed.
The first issue is the ads. Each account has an AD at the top of the list of messages that could easily be mistaken as an email. I originally felt I was okay ignoring them – it’s just part of the deal. But, the ad I saw and clicked on today was 100% a scam site and preys on people that are susceptible to fraudulent endorsements of famous people. In this case it was Trudeau (Canadian Prime Minister) endorsing a way to get thousands of tax dollars back. It is the same template I’ve seen with other notable names (Bill Gates, Warren Buffet, Elon Musk, etc…). Here is the link for those who may be sceptical. It is 100% bs: https://profgenpro.click/landers/pensupca_zeno/?domain=cdn.dripvoice.com&clickid=003f4wha8hevrdc1&uclick=wha8q5vr&uclickhash=wha8q5vr-wha8hevr-g63y-0-ciq5-b7xo-b78p-bcbb7c
Secondly, hovering over hyperlinks in the new outlook doesn’t display the actual URL anymore. It is the #1 thing I ALWAYS do when I see an email mentioning a bank transaction, package delivery, or anything that might seem relevant.
What on earth are these people thinking!
The new outlook was forced on me a couple of days ago. I’ve got some decent gripes with it but the biggest issue I have is it seems to be funneling less astute users to getting scammed.The first issue is the ads. Each account has an AD at the top of the list of messages that could easily be mistaken as an email. I originally felt I was okay ignoring them – it’s just part of the deal. But, the ad I saw and clicked on today was 100% a scam site and preys on people that are susceptible to fraudulent endorsements of famous people. In this case it was Trudeau (Canadian Prime Minister) endorsing a way to get thousands of tax dollars back. It is the same template I’ve seen with other notable names (Bill Gates, Warren Buffet, Elon Musk, etc…). Here is the link for those who may be sceptical. It is 100% bs: https://profgenpro.click/landers/pensupca_zeno/?domain=cdn.dripvoice.com&clickid=003f4wha8hevrdc1&uclick=wha8q5vr&uclickhash=wha8q5vr-wha8hevr-g63y-0-ciq5-b7xo-b78p-bcbb7cSecondly, hovering over hyperlinks in the new outlook doesn’t display the actual URL anymore. It is the #1 thing I ALWAYS do when I see an email mentioning a bank transaction, package delivery, or anything that might seem relevant. What on earth are these people thinking! Read More
how to find the element which is greater than or equal to its row and smaller or equal to its column in a matrix
Hi everyone;
I am going to find the saddle points of a matrix M. The question is given below…
Write a function called saddle that finds saddle points in the input matrix M. For the purposes of this problem, a saddle point is defined as an element whose value is greater than or equal to every element in its row, and less than or equal to every element in its column. Note that there may be more than one saddle point in M. Return a matrix indices that has exactly two columns. Each row of indices corresponds to one saddle point with the first element of the row containing the row index of the saddle point and the second column containing the column index. The saddle points are provided in indices in the same order they are located in M according to column-major ordering. If there is no saddle point in M, then indices is the empty array.
I am trying that code:
function indices = saddle(M)
[ rows,cols ] = size(M);
[valR,posR] = max(M,[],2);
[valC,posC] = min(M,[],1);
indices= [];
for i = 1:length(posR)
if i == posC(posR(i))
indices= [indices; i, posR(i)];
end
end
end
It is running fine. But when i test my code for
>> mat=zeros(5,3)
mat =
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
I am getting wrong output :
saddle(mat)
ans =
1 1
the correct output must be
saddle(mat)
ans =
1 1
2 1
3 1
4 1
5 1
1 2
2 2
3 2
4 2
5 2
1 3
2 3
3 3
4 3
5 3
What i am doing wrong?? Thanks in advanceHi everyone;
I am going to find the saddle points of a matrix M. The question is given below…
Write a function called saddle that finds saddle points in the input matrix M. For the purposes of this problem, a saddle point is defined as an element whose value is greater than or equal to every element in its row, and less than or equal to every element in its column. Note that there may be more than one saddle point in M. Return a matrix indices that has exactly two columns. Each row of indices corresponds to one saddle point with the first element of the row containing the row index of the saddle point and the second column containing the column index. The saddle points are provided in indices in the same order they are located in M according to column-major ordering. If there is no saddle point in M, then indices is the empty array.
I am trying that code:
function indices = saddle(M)
[ rows,cols ] = size(M);
[valR,posR] = max(M,[],2);
[valC,posC] = min(M,[],1);
indices= [];
for i = 1:length(posR)
if i == posC(posR(i))
indices= [indices; i, posR(i)];
end
end
end
It is running fine. But when i test my code for
>> mat=zeros(5,3)
mat =
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
I am getting wrong output :
saddle(mat)
ans =
1 1
the correct output must be
saddle(mat)
ans =
1 1
2 1
3 1
4 1
5 1
1 2
2 2
3 2
4 2
5 2
1 3
2 3
3 3
4 3
5 3
What i am doing wrong?? Thanks in advance Hi everyone;
I am going to find the saddle points of a matrix M. The question is given below…
Write a function called saddle that finds saddle points in the input matrix M. For the purposes of this problem, a saddle point is defined as an element whose value is greater than or equal to every element in its row, and less than or equal to every element in its column. Note that there may be more than one saddle point in M. Return a matrix indices that has exactly two columns. Each row of indices corresponds to one saddle point with the first element of the row containing the row index of the saddle point and the second column containing the column index. The saddle points are provided in indices in the same order they are located in M according to column-major ordering. If there is no saddle point in M, then indices is the empty array.
I am trying that code:
function indices = saddle(M)
[ rows,cols ] = size(M);
[valR,posR] = max(M,[],2);
[valC,posC] = min(M,[],1);
indices= [];
for i = 1:length(posR)
if i == posC(posR(i))
indices= [indices; i, posR(i)];
end
end
end
It is running fine. But when i test my code for
>> mat=zeros(5,3)
mat =
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
I am getting wrong output :
saddle(mat)
ans =
1 1
the correct output must be
saddle(mat)
ans =
1 1
2 1
3 1
4 1
5 1
1 2
2 2
3 2
4 2
5 2
1 3
2 3
3 3
4 3
5 3
What i am doing wrong?? Thanks in advance order, matrix, homework MATLAB Answers — New Questions
How to produce a value for every nth value
I am trying to create a schedule for going to the gym. I go to the gym every day except Monday. So Tuesday I would do chest, Wednesday Arms, Thursday Legs and then it resets with chest on Friday, arms on Saturday. I have a list a dates scheduled out for 3 months starting from 6/21/24. How do I dynamically make it so every time the date is Tuesday-Sunday, it will automatically reset to chest or arms or legs in order while skipping Mondays for the next two months.
I am trying to create a schedule for going to the gym. I go to the gym every day except Monday. So Tuesday I would do chest, Wednesday Arms, Thursday Legs and then it resets with chest on Friday, arms on Saturday. I have a list a dates scheduled out for 3 months starting from 6/21/24. How do I dynamically make it so every time the date is Tuesday-Sunday, it will automatically reset to chest or arms or legs in order while skipping Mondays for the next two months. Read More
inverse kinematics (self made function) errors
% This is my current code. I am attempting to use inverse kinematics to
% plot the same semicircle i made using forward kinematics. My issue is
% that the function i am currently using doesn’t properly calculate the
% "joint2" angle (it prints the same value always)
% NOTE: the error i am having occurs mostly in STEP 4 of my code.
clear;
clc;
% Step one: Defining linked robot and confirming it is correct
L_1(1) = Link([0 199.07 0 pi/2]);
L_1(2) = Link([0 -27 -23.33 -pi/2]);
L_1(3) = Link([0 -12.18 0 0]);
L_1(4) = Link([0 0 0 -pi/2]);
L_1(5) = Link([0 0 107.92 0]);
L_1(6) = Link([0 0 0 0]);
L_1(7) = Link([0 0 133.99 0]);
robot1 = SerialLink(L_1);
figure(2);
robot1.plot([pi/2 0 pi/2 0 0.6542 1.36 0], ‘nojoints’);
hold on;
% Success
% ——————————————————————— %
% Step two: retrieving end effector coordinates and confirming thier
% position
coor = robot1.fkine([pi/2 0 pi/2 0 0.6542 1.36 0]);
xF = coor.t(1);
yF = coor.t(2);
zF = coor.t(3);
% disp([‘(‘, num2str(xF), ‘ , ‘, num2str(yF) , ‘ , ‘ num2str(zF), ‘)’]);
% plot3(xF,yF,zF, ‘o’, ‘Color’, ‘g’);
% Success
% ——————————————————————— %
% Step three: plotting a semicircle
radius_S3 = 200;
pointsNum = ( pi/(pi/16) + 1);
semiCircleArray = zeros(pointsNum, 3);
index = 1;
for theta = pi : -pi/16 : 0
xF = radius_S3 * cos(theta);
yF = -23.33;
zF = radius_S3 * sin(theta);
plot3(xF,yF,zF, ‘*’, ‘Color’, ‘r’);
% disp([‘(‘, num2str(xForward), ‘ , ‘, num2str(yForward) , ‘ , ‘ num2str(zForward), ‘)’]);
semiCircleArray(index, 🙂 = [xF, yF, zF];
index = index + 1;
end
plot3(semiCircleArray(:, 1), semiCircleArray(:, 2), semiCircleArray(:, 3), ‘o’, ‘Color’, ‘b’);
% Success
% ——————————————————————— %
% Step four: inserting array values into function to confirm angles.
joint1 = zeros(pointsNum, 1);
joint2 = zeros(pointsNum, 1);
for i = 1:pointsNum
[joint1(i), joint2(i)] = theta2Output(semiCircleArray(i, 3), semiCircleArray(i, 1));
disp([‘j1: ‘, num2str(joint1(i)), ‘ , j2: ‘, num2str(joint2(i))]);
end
% This is where something goes wrong, which confirms there is an issue
% with my function. The value of one joint angle slowly increments
% whilst the other stays unchanged.
title(‘Right Leg – J1 J2 J3’);
xlabel(‘x-axis’);
ylabel(‘y-axis’);
zlabel(‘z-axis’);
function [joint1 , joint2] = theta2Output(x, z)
l1 = 107.92;
l2 = 133.99;
x = x(:);
z = z(:);
term1 = x.^2;
term2 = z.^2;
term3 = l1^2;
term4 = l2^2;
cos_joint2 = (term1 + term2 – term3 – term4) / (2 * l2 * l1);
joint2 = acos(cos_joint2);
joint1 = atan2(x , z) – atan2((l2 * sin(joint2)) , (l1 + (l2*cos(joint2))));
end% This is my current code. I am attempting to use inverse kinematics to
% plot the same semicircle i made using forward kinematics. My issue is
% that the function i am currently using doesn’t properly calculate the
% "joint2" angle (it prints the same value always)
% NOTE: the error i am having occurs mostly in STEP 4 of my code.
clear;
clc;
% Step one: Defining linked robot and confirming it is correct
L_1(1) = Link([0 199.07 0 pi/2]);
L_1(2) = Link([0 -27 -23.33 -pi/2]);
L_1(3) = Link([0 -12.18 0 0]);
L_1(4) = Link([0 0 0 -pi/2]);
L_1(5) = Link([0 0 107.92 0]);
L_1(6) = Link([0 0 0 0]);
L_1(7) = Link([0 0 133.99 0]);
robot1 = SerialLink(L_1);
figure(2);
robot1.plot([pi/2 0 pi/2 0 0.6542 1.36 0], ‘nojoints’);
hold on;
% Success
% ——————————————————————— %
% Step two: retrieving end effector coordinates and confirming thier
% position
coor = robot1.fkine([pi/2 0 pi/2 0 0.6542 1.36 0]);
xF = coor.t(1);
yF = coor.t(2);
zF = coor.t(3);
% disp([‘(‘, num2str(xF), ‘ , ‘, num2str(yF) , ‘ , ‘ num2str(zF), ‘)’]);
% plot3(xF,yF,zF, ‘o’, ‘Color’, ‘g’);
% Success
% ——————————————————————— %
% Step three: plotting a semicircle
radius_S3 = 200;
pointsNum = ( pi/(pi/16) + 1);
semiCircleArray = zeros(pointsNum, 3);
index = 1;
for theta = pi : -pi/16 : 0
xF = radius_S3 * cos(theta);
yF = -23.33;
zF = radius_S3 * sin(theta);
plot3(xF,yF,zF, ‘*’, ‘Color’, ‘r’);
% disp([‘(‘, num2str(xForward), ‘ , ‘, num2str(yForward) , ‘ , ‘ num2str(zForward), ‘)’]);
semiCircleArray(index, 🙂 = [xF, yF, zF];
index = index + 1;
end
plot3(semiCircleArray(:, 1), semiCircleArray(:, 2), semiCircleArray(:, 3), ‘o’, ‘Color’, ‘b’);
% Success
% ——————————————————————— %
% Step four: inserting array values into function to confirm angles.
joint1 = zeros(pointsNum, 1);
joint2 = zeros(pointsNum, 1);
for i = 1:pointsNum
[joint1(i), joint2(i)] = theta2Output(semiCircleArray(i, 3), semiCircleArray(i, 1));
disp([‘j1: ‘, num2str(joint1(i)), ‘ , j2: ‘, num2str(joint2(i))]);
end
% This is where something goes wrong, which confirms there is an issue
% with my function. The value of one joint angle slowly increments
% whilst the other stays unchanged.
title(‘Right Leg – J1 J2 J3’);
xlabel(‘x-axis’);
ylabel(‘y-axis’);
zlabel(‘z-axis’);
function [joint1 , joint2] = theta2Output(x, z)
l1 = 107.92;
l2 = 133.99;
x = x(:);
z = z(:);
term1 = x.^2;
term2 = z.^2;
term3 = l1^2;
term4 = l2^2;
cos_joint2 = (term1 + term2 – term3 – term4) / (2 * l2 * l1);
joint2 = acos(cos_joint2);
joint1 = atan2(x , z) – atan2((l2 * sin(joint2)) , (l1 + (l2*cos(joint2))));
end % This is my current code. I am attempting to use inverse kinematics to
% plot the same semicircle i made using forward kinematics. My issue is
% that the function i am currently using doesn’t properly calculate the
% "joint2" angle (it prints the same value always)
% NOTE: the error i am having occurs mostly in STEP 4 of my code.
clear;
clc;
% Step one: Defining linked robot and confirming it is correct
L_1(1) = Link([0 199.07 0 pi/2]);
L_1(2) = Link([0 -27 -23.33 -pi/2]);
L_1(3) = Link([0 -12.18 0 0]);
L_1(4) = Link([0 0 0 -pi/2]);
L_1(5) = Link([0 0 107.92 0]);
L_1(6) = Link([0 0 0 0]);
L_1(7) = Link([0 0 133.99 0]);
robot1 = SerialLink(L_1);
figure(2);
robot1.plot([pi/2 0 pi/2 0 0.6542 1.36 0], ‘nojoints’);
hold on;
% Success
% ——————————————————————— %
% Step two: retrieving end effector coordinates and confirming thier
% position
coor = robot1.fkine([pi/2 0 pi/2 0 0.6542 1.36 0]);
xF = coor.t(1);
yF = coor.t(2);
zF = coor.t(3);
% disp([‘(‘, num2str(xF), ‘ , ‘, num2str(yF) , ‘ , ‘ num2str(zF), ‘)’]);
% plot3(xF,yF,zF, ‘o’, ‘Color’, ‘g’);
% Success
% ——————————————————————— %
% Step three: plotting a semicircle
radius_S3 = 200;
pointsNum = ( pi/(pi/16) + 1);
semiCircleArray = zeros(pointsNum, 3);
index = 1;
for theta = pi : -pi/16 : 0
xF = radius_S3 * cos(theta);
yF = -23.33;
zF = radius_S3 * sin(theta);
plot3(xF,yF,zF, ‘*’, ‘Color’, ‘r’);
% disp([‘(‘, num2str(xForward), ‘ , ‘, num2str(yForward) , ‘ , ‘ num2str(zForward), ‘)’]);
semiCircleArray(index, 🙂 = [xF, yF, zF];
index = index + 1;
end
plot3(semiCircleArray(:, 1), semiCircleArray(:, 2), semiCircleArray(:, 3), ‘o’, ‘Color’, ‘b’);
% Success
% ——————————————————————— %
% Step four: inserting array values into function to confirm angles.
joint1 = zeros(pointsNum, 1);
joint2 = zeros(pointsNum, 1);
for i = 1:pointsNum
[joint1(i), joint2(i)] = theta2Output(semiCircleArray(i, 3), semiCircleArray(i, 1));
disp([‘j1: ‘, num2str(joint1(i)), ‘ , j2: ‘, num2str(joint2(i))]);
end
% This is where something goes wrong, which confirms there is an issue
% with my function. The value of one joint angle slowly increments
% whilst the other stays unchanged.
title(‘Right Leg – J1 J2 J3’);
xlabel(‘x-axis’);
ylabel(‘y-axis’);
zlabel(‘z-axis’);
function [joint1 , joint2] = theta2Output(x, z)
l1 = 107.92;
l2 = 133.99;
x = x(:);
z = z(:);
term1 = x.^2;
term2 = z.^2;
term3 = l1^2;
term4 = l2^2;
cos_joint2 = (term1 + term2 – term3 – term4) / (2 * l2 * l1);
joint2 = acos(cos_joint2);
joint1 = atan2(x , z) – atan2((l2 * sin(joint2)) , (l1 + (l2*cos(joint2))));
end inverse kinematics, serial robot MATLAB Answers — New Questions
Unable to receive email from the rooms /Resources.
Hello
Please i need your help on this issue.
We are Unable to receive email from the teams rooms /Resources.
Hello Please i need your help on this issue. We are Unable to receive email from the teams rooms /Resources. Read More
Use budget management and forecasting to bring your FinOps practice into the era of AI
Microsoft Tech Community – Latest Blogs –Read More
Is there a simulink version that works with Inventor 2022 and later?
The simulink description page said that the inventor is only supported up to the 2021 version.
Currently, with the 2025 version coming out, it is not possible to download the 2021 version.
Is there a simulink version that is compatible with 2022 or later versions of the inventor?The simulink description page said that the inventor is only supported up to the 2021 version.
Currently, with the 2025 version coming out, it is not possible to download the 2021 version.
Is there a simulink version that is compatible with 2022 or later versions of the inventor? The simulink description page said that the inventor is only supported up to the 2021 version.
Currently, with the 2025 version coming out, it is not possible to download the 2021 version.
Is there a simulink version that is compatible with 2022 or later versions of the inventor? simulink, inventor, compatible MATLAB Answers — New Questions
MathWorks Service Host is drastically slowing down starttime and fills up users $HOME
We have the same issue as https://www.mathworks.com/matlabcentral/answers/2128851-why-is-the-mathworks-service-host-causing-issues-with-my-cluster-and-or-hpc and I see there that "For R2024a and newer, regardless of your licensing, the MathWorks Service Host is required"
When running in a cluster, this process is repeated every time MATLAB is started on a new node.
This not only causes uneccessary delays but it also piles up lots of data on the users’ HOME space.
If we have 300 nodes, at ~640MB per node under $HOME/.MathWorks/ServiceHost a user would require more than 180GB just to host this data. This makes version 2024 not suitable for cluster environments.
How do we fix this issue?We have the same issue as https://www.mathworks.com/matlabcentral/answers/2128851-why-is-the-mathworks-service-host-causing-issues-with-my-cluster-and-or-hpc and I see there that "For R2024a and newer, regardless of your licensing, the MathWorks Service Host is required"
When running in a cluster, this process is repeated every time MATLAB is started on a new node.
This not only causes uneccessary delays but it also piles up lots of data on the users’ HOME space.
If we have 300 nodes, at ~640MB per node under $HOME/.MathWorks/ServiceHost a user would require more than 180GB just to host this data. This makes version 2024 not suitable for cluster environments.
How do we fix this issue? We have the same issue as https://www.mathworks.com/matlabcentral/answers/2128851-why-is-the-mathworks-service-host-causing-issues-with-my-cluster-and-or-hpc and I see there that "For R2024a and newer, regardless of your licensing, the MathWorks Service Host is required"
When running in a cluster, this process is repeated every time MATLAB is started on a new node.
This not only causes uneccessary delays but it also piles up lots of data on the users’ HOME space.
If we have 300 nodes, at ~640MB per node under $HOME/.MathWorks/ServiceHost a user would require more than 180GB just to host this data. This makes version 2024 not suitable for cluster environments.
How do we fix this issue? mathworks service host cluster hpc MATLAB Answers — New Questions
agent doesn’t take different actions to different states
Hello everyone,
I have two issues:
I wasn’t able to set up the environment so that the agent takes 24 different actions over the course of a day, meaning the agent takes one action every hour. As a workaround, I decided to train agents by the hour.
The second issue, which is the reason for my question, arises after training the agent. When I test the efficiency of its decision-making and run the simulation part of the RL Toolbox, I notice that the agent always takes the same action regardless of the state of the environment. This leads me to believe that the training process determines the best action for a set of states, which is not what I want. I want the agent to take the correct action for different states. I’ve been analyzing my environment code but can’t figure out why the agent behaves this way.
Thank you in advance.
BryanHello everyone,
I have two issues:
I wasn’t able to set up the environment so that the agent takes 24 different actions over the course of a day, meaning the agent takes one action every hour. As a workaround, I decided to train agents by the hour.
The second issue, which is the reason for my question, arises after training the agent. When I test the efficiency of its decision-making and run the simulation part of the RL Toolbox, I notice that the agent always takes the same action regardless of the state of the environment. This leads me to believe that the training process determines the best action for a set of states, which is not what I want. I want the agent to take the correct action for different states. I’ve been analyzing my environment code but can’t figure out why the agent behaves this way.
Thank you in advance.
Bryan Hello everyone,
I have two issues:
I wasn’t able to set up the environment so that the agent takes 24 different actions over the course of a day, meaning the agent takes one action every hour. As a workaround, I decided to train agents by the hour.
The second issue, which is the reason for my question, arises after training the agent. When I test the efficiency of its decision-making and run the simulation part of the RL Toolbox, I notice that the agent always takes the same action regardless of the state of the environment. This leads me to believe that the training process determines the best action for a set of states, which is not what I want. I want the agent to take the correct action for different states. I’ve been analyzing my environment code but can’t figure out why the agent behaves this way.
Thank you in advance.
Bryan agent drl, action agent, rl toobox MATLAB Answers — New Questions
How do I debug DLL code in Visual Studio after using loadlibrary in MATLAB?
I have a C++ code that I have compiled in Visual Studio 2022 as a DLL. I use MATLAB to call the DLL using the function loadlibrary. The code executes no problem. However, I want to enter the Visual Studio debugger to step through the code once MATLAB calls the DLL. Years ago in a previous version of Visual Studio and MATLAB, a friend showed me how to connect Visual Studio to MATLAB. In Visual Studio, I would select "Build->Attach to process" and pick the MATLAB process that would appear in the window. Then, I could add a breakpoint in the C code, and when MATLAB called the DLL, the Visual Studio debugger would stop code execution at the break point and let me step through the code. I’m unable to do that now for some reason. When I attach MATLAB to Visual Studio, the breakpoint turns to an empty red outline circle with a caution triangle on it. When I hover over it, the tooltip says "The breakpoint will not currently be hit. No symbols have been loaded for this document." The Symbol Status column of the Debug->Windows->Modules dialog says "Cannot find or open the PDB file." I’m unsure what to do here. I’m sure I’m just forgetting a step that I was shown years back. Any help would be appreciated. Note Visual Studio did create a pdb file along with the DLL and both are in the same directory. Also, I compiled in debug mode, not release mode.I have a C++ code that I have compiled in Visual Studio 2022 as a DLL. I use MATLAB to call the DLL using the function loadlibrary. The code executes no problem. However, I want to enter the Visual Studio debugger to step through the code once MATLAB calls the DLL. Years ago in a previous version of Visual Studio and MATLAB, a friend showed me how to connect Visual Studio to MATLAB. In Visual Studio, I would select "Build->Attach to process" and pick the MATLAB process that would appear in the window. Then, I could add a breakpoint in the C code, and when MATLAB called the DLL, the Visual Studio debugger would stop code execution at the break point and let me step through the code. I’m unable to do that now for some reason. When I attach MATLAB to Visual Studio, the breakpoint turns to an empty red outline circle with a caution triangle on it. When I hover over it, the tooltip says "The breakpoint will not currently be hit. No symbols have been loaded for this document." The Symbol Status column of the Debug->Windows->Modules dialog says "Cannot find or open the PDB file." I’m unsure what to do here. I’m sure I’m just forgetting a step that I was shown years back. Any help would be appreciated. Note Visual Studio did create a pdb file along with the DLL and both are in the same directory. Also, I compiled in debug mode, not release mode. I have a C++ code that I have compiled in Visual Studio 2022 as a DLL. I use MATLAB to call the DLL using the function loadlibrary. The code executes no problem. However, I want to enter the Visual Studio debugger to step through the code once MATLAB calls the DLL. Years ago in a previous version of Visual Studio and MATLAB, a friend showed me how to connect Visual Studio to MATLAB. In Visual Studio, I would select "Build->Attach to process" and pick the MATLAB process that would appear in the window. Then, I could add a breakpoint in the C code, and when MATLAB called the DLL, the Visual Studio debugger would stop code execution at the break point and let me step through the code. I’m unable to do that now for some reason. When I attach MATLAB to Visual Studio, the breakpoint turns to an empty red outline circle with a caution triangle on it. When I hover over it, the tooltip says "The breakpoint will not currently be hit. No symbols have been loaded for this document." The Symbol Status column of the Debug->Windows->Modules dialog says "Cannot find or open the PDB file." I’m unsure what to do here. I’m sure I’m just forgetting a step that I was shown years back. Any help would be appreciated. Note Visual Studio did create a pdb file along with the DLL and both are in the same directory. Also, I compiled in debug mode, not release mode. dll, visual-studio, debug, loadlibrary MATLAB Answers — New Questions
Version of chat gpt used in Word 2016
The rest of my team is asking me what version of Chat gpt is used in Word MSO Version 2406 Build 16. I’m assuming V 4.
Thanks!
The rest of my team is asking me what version of Chat gpt is used in Word MSO Version 2406 Build 16. I’m assuming V 4.Thanks! Read More
External Data Sharing With Microsoft Fabric
Organizations leveraging Microsoft Fabric can now use the external data sharing feature to allow users from another Microsoft Fabric tenant access their data. The data stays in the provider’s OneLake storage location and no data is moved. Instead, this cross-tenant sharing creates a link, called a OneLake shortcut, and the recipient of the share tenant creates a pointer back to the provider tenant. Users in the recipient tenant are provided a read only access to the data. The data is shared across tenant boundaries, and the recipient can use it with any OneLake compatible Fabric workload in their own tenant. What makes external sharing solution so seamless and frictionless is the fact that the adoption of PowerBI already has massive adoption in terms of the number of organizations and the millions of users who leverage it daily. The key becomes, organizations don’t need to do anything different nor stand up any new products and solutions; organizations and users can simply continue to use what they have been using and take advantage of this new feature.
External data sharing is currently supported for data residing in tables or files within:
Lakehouses
KQL databases
We wanted to provide some high level step by step guidance to demonstrate how easy it was to setup the external sharing:
Step 1 Enable External Tenant Sharing:
1. Enable external data sharing in the provider tenant
Go to the tenant settings in the providing tenant.
Find the External data sharing (preview) tenant setting (under export and sharing settings), enable the toggle, and specify who in the tenant can create external data shares.
Decide if you want to enable this capability for everyone or limit to certain security groups.
Step 2 Create an external data share:
In a workspace or in the OneLake data hub, find the Fabric item that contains the data you want to share.
Open the context menu of the selected item and choose External data share (preview).
In the New external data share dialog that opens, choose the folder or table to be shared and select Save and continue.
Enter the email address of the user you want to share the data with and select Send. An email will be sent to the user inviting them to accept the invitation to share. Alternatively, you can select Copy link and then paste it into an email that you yourself compose.
Note – it is just as easy to revoke the share – under manage permissions:
Step 3 Allow/accept external data share in recipient tenant:
Go to the tenant settings in the recipient tenant.
Find the Users can accept external data shares (preview) tenant setting (under export and sharing settings), enable the toggle, and specify who in the tenant can create external data shares.
Decide if you want to enable this capability for everyone or limit to certain security groups
Accept an external data share:
Go to the link received via email and click on Get Started.
2. A dialog similar to one below appears that displays the name of the share and the details of the data provider’s tenant.
3. Select Accept and select a location. This opens the OneLake data hub. Select a lakehouse.
4. Select Next, select the table or folder location in which to create the incoming share shortcut, and then select Apply.
Observations:
The external data share shows up as a shortcut with the name starting with a “External_”.
The external data share gives a read-only version of data that can be accessed through all the Fabric experiences. For the spark notebook experience, users can choose from multiple languages or the low code/no code data wrangler experience to transform and prepare the data. In the example below, the table “store” is combined with the external shortcut “EXTERNAL_storeprofile”, which provides the store profile data, to get a complete view of the store features. The result is then saved to a new table, “storewprofile”. This new table can be accessed through the SQL Analytics Endpoint, Fabric Data Factory, or PBI experiences.
Here is an example of the SQL Analytics endpoint on the “External_” share:
3. The external share can be viewed through the lineage view of the workspace.
Key Takeaways
The external data share is a very powerful feature and so we hope you take away the following from the content we have shared:
Ease of creating and revoking a share.
Simplicity of accepting a share as the recipient.
Fabric Ecosystem & Non-Fabric Use Cases – although we have demonstrated a very Fabric centric article, non-fabric users can still benefit from this solution. For instance, if you are a Tableau user, you can connect to the XMLA endpoint of a semantic model or the SQL endpoint of Fabric via the necessary drivers. Given this, the solution only becomes even more compelling as it can handle both Fabric centric and non Fabric centric scenarios.
Microsoft Tech Community – Latest Blogs –Read More
Issue with ARXML Importer API Not Generating All Ports and IRVs in Init Runnable in MATLAB
When using MATLAB’s ARXML Importer API (arxml.importer), why does all ports and IRVs specified in the ARXML file are not generated within the Init runnable?When using MATLAB’s ARXML Importer API (arxml.importer), why does all ports and IRVs specified in the ARXML file are not generated within the Init runnable? When using MATLAB’s ARXML Importer API (arxml.importer), why does all ports and IRVs specified in the ARXML file are not generated within the Init runnable? arxml, importer, missing, ports, init, runnable, autosar MATLAB Answers — New Questions