Category: News
Super Mario Song Powershell
function b($a,$b){
[console]::beep($a,$b)
}
function s($a){
sleep -m $a
}
write-host “Super Mario!”
b 660 100;
s 150;
b 660 100;
s 300;
b 660 100;
s 300;
b 510 100;
s 100;
b 660 100;
s 300;
b 770 100;
s 550;
b 380 100;
s 575;
b 510 100;
s 450;
b 380 100;
s 400;
b 320 100;
s 500;
b 440 100;
s 300;
b 480 80;
s 330;
b 450 100;
s 150;
b 430 100;
s 300;
b 380 100;
s 200;
b 660 80;
s 200;
b 760 50;
s 150;
b 860 100;
s 300;
b 700 80;
s 150;
b 760 50;
s 350;
b 660 80;
s 300;
b 520 80;
s 150;
b 580 80;
s 150;
b 480 80;
s 500;
b 510 100;
s 450;
b 380 100;
s 400;
b 320 100;
s 500;
b 440 100;
s 300;
b 480 80;
s 330;
b 450 100;
s 150;
b 430 100;
s 300;
b 380 100;
s 200;
b 660 80;
s 200;
b 760 50;
s 150;
b 860 100;
s 300;
b 700 80;
s 150;
b 760 50;
s 350;
b 660 80;
s 300;
b 520 80;
s 150;
b 580 80;
s 150;
b 480 80;
s 500;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 150;
s 300;
b 380 100;
s 150;
b 430 100;
s 150;
b 500 100;
s 300;
b 430 100;
s 150;
b 500 100;
s 100;
b 570 100;
s 220;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 200;
s 300;
b 1020 80;
s 300;
b 1020 80;
s 150;
b 1020 80;
s 300;
b 380 100;
s 300;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 150;
s 300;
b 380 100;
s 150;
b 430 100;
s 150;
b 500 100;
s 300;
b 430 100;
s 150;
b 500 100;
s 100;
b 570 100;
s 420;
b 585 100;
s 450;
b 550 100;
s 420;
b 500 100;
s 360;
b 380 100;
s 300;
b 500 100;
s 300;
b 500 100;
s 150;
b 500 100;
s 300;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 150;
s 300;
b 380 100;
s 150;
b 430 100;
s 150;
b 500 100;
s 300;
b 430 100;
s 150;
b 500 100;
s 100;
b 570 100;
s 220;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 200;
s 300;
b 1020 80;
s 300;
b 1020 80;
s 150;
b 1020 80;
s 300;
b 380 100;
s 300;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 150;
s 300;
b 380 100;
s 150;
b 430 100;
s 150;
b 500 100;
s 300;
b 430 100;
s 150;
b 500 100;
s 100;
b 570 100;
s 420;
b 585 100;
s 450;
b 550 100;
s 420;
b 500 100;
s 360;
b 380 100;
s 300;
b 500 100;
s 300;
b 500 100;
s 150;
b 500 100;
s 300;
b 500 60;
s 150;
b 500 80;
s 300;
b 500 60;
s 350;
b 500 80;
s 150;
b 580 80;
s 350;
b 660 80;
s 150;
b 500 80;
s 300;
b 430 80;
s 150;
b 380 80;
s 600;
b 500 60;
s 150;
b 500 80;
s 300;
b 500 60;
s 350;
b 500 80;
s 150;
b 580 80;
s 150;
b 660 80;
s 550;
b 870 80;
s 325;
b 760 80;
s 600;
b 500 60;
s 150;
b 500 80;
s 300;
b 500 60;
s 350;
b 500 80;
s 150;
b 580 80;
s 350;
b 660 80;
s 150;
b 500 80;
s 300;
b 430 80;
s 150;
b 380 80;
s 600;
b 660 100;
s 150;
b 660 100;
s 300;
b 660 100;
s 300;
b 510 100;
s 100;
b 660 100;
s 300;
b 770 100;
s 550;
b 380 100;
s 575;
function b($a,$b){
[console]::beep($a,$b)
}
function s($a){
sleep -m $a
}
write-host “Super Mario!”
b 660 100;
s 150;
b 660 100;
s 300;
b 660 100;
s 300;
b 510 100;
s 100;
b 660 100;
s 300;
b 770 100;
s 550;
b 380 100;
s 575;
b 510 100;
s 450;
b 380 100;
s 400;
b 320 100;
s 500;
b 440 100;
s 300;
b 480 80;
s 330;
b 450 100;
s 150;
b 430 100;
s 300;
b 380 100;
s 200;
b 660 80;
s 200;
b 760 50;
s 150;
b 860 100;
s 300;
b 700 80;
s 150;
b 760 50;
s 350;
b 660 80;
s 300;
b 520 80;
s 150;
b 580 80;
s 150;
b 480 80;
s 500;
b 510 100;
s 450;
b 380 100;
s 400;
b 320 100;
s 500;
b 440 100;
s 300;
b 480 80;
s 330;
b 450 100;
s 150;
b 430 100;
s 300;
b 380 100;
s 200;
b 660 80;
s 200;
b 760 50;
s 150;
b 860 100;
s 300;
b 700 80;
s 150;
b 760 50;
s 350;
b 660 80;
s 300;
b 520 80;
s 150;
b 580 80;
s 150;
b 480 80;
s 500;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 150;
s 300;
b 380 100;
s 150;
b 430 100;
s 150;
b 500 100;
s 300;
b 430 100;
s 150;
b 500 100;
s 100;
b 570 100;
s 220;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 200;
s 300;
b 1020 80;
s 300;
b 1020 80;
s 150;
b 1020 80;
s 300;
b 380 100;
s 300;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 150;
s 300;
b 380 100;
s 150;
b 430 100;
s 150;
b 500 100;
s 300;
b 430 100;
s 150;
b 500 100;
s 100;
b 570 100;
s 420;
b 585 100;
s 450;
b 550 100;
s 420;
b 500 100;
s 360;
b 380 100;
s 300;
b 500 100;
s 300;
b 500 100;
s 150;
b 500 100;
s 300;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 150;
s 300;
b 380 100;
s 150;
b 430 100;
s 150;
b 500 100;
s 300;
b 430 100;
s 150;
b 500 100;
s 100;
b 570 100;
s 220;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 200;
s 300;
b 1020 80;
s 300;
b 1020 80;
s 150;
b 1020 80;
s 300;
b 380 100;
s 300;
b 500 100;
s 300;
b 760 100;
s 100;
b 720 100;
s 150;
b 680 100;
s 150;
b 620 150;
s 300;
b 650 150;
s 300;
b 380 100;
s 150;
b 430 100;
s 150;
b 500 100;
s 300;
b 430 100;
s 150;
b 500 100;
s 100;
b 570 100;
s 420;
b 585 100;
s 450;
b 550 100;
s 420;
b 500 100;
s 360;
b 380 100;
s 300;
b 500 100;
s 300;
b 500 100;
s 150;
b 500 100;
s 300;
b 500 60;
s 150;
b 500 80;
s 300;
b 500 60;
s 350;
b 500 80;
s 150;
b 580 80;
s 350;
b 660 80;
s 150;
b 500 80;
s 300;
b 430 80;
s 150;
b 380 80;
s 600;
b 500 60;
s 150;
b 500 80;
s 300;
b 500 60;
s 350;
b 500 80;
s 150;
b 580 80;
s 150;
b 660 80;
s 550;
b 870 80;
s 325;
b 760 80;
s 600;
b 500 60;
s 150;
b 500 80;
s 300;
b 500 60;
s 350;
b 500 80;
s 150;
b 580 80;
s 350;
b 660 80;
s 150;
b 500 80;
s 300;
b 430 80;
s 150;
b 380 80;
s 600;
b 660 100;
s 150;
b 660 100;
s 300;
b 660 100;
s 300;
b 510 100;
s 100;
b 660 100;
s 300;
b 770 100;
s 550;
b 380 100;
s 575; Read More
Two meetings created where there should only be one
I just started deploying a reservation page that allows up to 85 people to attend a single service. It actually is training on a wide scale, and consists of five such Teams meetings spread over two weeks.
There is however a bug : most people registered correctly, but about 15% of attendees are registered under a different Teams meeting, even though the first meeting still has availability.
I would like to prevent a second meeting from being created. Right now, I have to check the “minor” meeting for a list of its attendees, and manually add attendees to the “major” meeting. Then, I cancel the “minor” meeting. But this second “minor” meeting ends up being created again a few hours later.
I plan on having about 500 attendees, so this is rather tiresome. Does anyone know how to prevent this?
I just started deploying a reservation page that allows up to 85 people to attend a single service. It actually is training on a wide scale, and consists of five such Teams meetings spread over two weeks.There is however a bug : most people registered correctly, but about 15% of attendees are registered under a different Teams meeting, even though the first meeting still has availability. I would like to prevent a second meeting from being created. Right now, I have to check the “minor” meeting for a list of its attendees, and manually add attendees to the “major” meeting. Then, I cancel the “minor” meeting. But this second “minor” meeting ends up being created again a few hours later. I plan on having about 500 attendees, so this is rather tiresome. Does anyone know how to prevent this? Read More
composeExtension with type “message” will not return text to compose message area with Messaging Ext
composeExtension with type “message” will not return text to compose message area with Messaging Extensions
I meet the same issue as “composeExtension with type “message” will not return text to compose message area with Messaging Extensions” . Could anyone please give some suggestions.
composeExtension with type “message” will not return text to compose message area with Messaging Extensions I meet the same issue as “composeExtension with type “message” will not return text to compose message area with Messaging Extensions” . Could anyone please give some suggestions. Read More
bing vision search API param ‘mkt’: ‘zh-CN’ does not take effect
we meet issue when accessing bing vision search API.
When we call the bing vision search API, specifying the market by adding the parameter {‘mkt’: ‘zh-CN’} as mentioned in https://learn.microsoft.com/zh-cn/bing/search-apis/bing-visual-search/reference/query-parameters, but the searching result returned does not fit Chinese market. The returned links in “hostPageUrl” cannot be accessed due to China local policy.
we meet issue when accessing bing vision search API.When we call the bing vision search API, specifying the market by adding the parameter {‘mkt’: ‘zh-CN’} as mentioned in https://learn.microsoft.com/zh-cn/bing/search-apis/bing-visual-search/reference/query-parameters, but the searching result returned does not fit Chinese market. The returned links in “hostPageUrl” cannot be accessed due to China local policy. Read More
Cannot enter dates in English (Australia) format
Hi,
I just spent about 1 hr with Microsoft 365 live chat and went around in circles without resolving the issue.
Here are the details:
– Using Mac Sonoma latest version with m3 max and excel (Microsoft 365)
– I have confirmed my Language and region settings are for Australia
I tried adding EXCEL to the customized Applications at the bottom but this didn’t change the results.
When I enter the Australia date format it reverts to USA format.
When dates start from ’13’ ie 13th June 2024 –> 13/6/24 they will display correctly because this would not work in USA format as 6/13/24 is an invalid date.
Hopefully someone out there has a fix for this.
Thanks!
Hi,I just spent about 1 hr with Microsoft 365 live chat and went around in circles without resolving the issue. Here are the details: – Using Mac Sonoma latest version with m3 max and excel (Microsoft 365)- I have confirmed my Language and region settings are for Australia I tried adding EXCEL to the customized Applications at the bottom but this didn’t change the results. When I enter the Australia date format it reverts to USA format. When dates start from ’13’ ie 13th June 2024 –> 13/6/24 they will display correctly because this would not work in USA format as 6/13/24 is an invalid date. Hopefully someone out there has a fix for this. Thanks! Read More
How to pin business locations using a city map in excel
Hello, I’m an average user on Excel. I’ve created a simple spreadsheet for our local historical society to enter business information from city directories with column headings of “business name,” “street address,” “city,” “state,” “business category” “owner(s)” and then several columns following with the years of the city directories. As business information is entered from each directory, the user simply enters an X in the corresponding year column. We would like to be able to see locations of these businesses on a city map by corresponding year. I was thinking that prompts for the user to choose a city directory year and another prompt for the user to choose a business category. Regarding the business category, I was also thinking about allowing the user to either choose 1 or any number of categories, along with the choice of all categories too. If that is possible? I’ve seen some videos about Map charts and I’m not sure if this would work or if something else would be more feasible. Any help would be greatly appreciated.
Thanks,
James
Hello, I’m an average user on Excel. I’ve created a simple spreadsheet for our local historical society to enter business information from city directories with column headings of “business name,” “street address,” “city,” “state,” “business category” “owner(s)” and then several columns following with the years of the city directories. As business information is entered from each directory, the user simply enters an X in the corresponding year column. We would like to be able to see locations of these businesses on a city map by corresponding year. I was thinking that prompts for the user to choose a city directory year and another prompt for the user to choose a business category. Regarding the business category, I was also thinking about allowing the user to either choose 1 or any number of categories, along with the choice of all categories too. If that is possible? I’ve seen some videos about Map charts and I’m not sure if this would work or if something else would be more feasible. Any help would be greatly appreciated.Thanks,James Read More
4D spherical shell heat map
I have written a code (attached) to plot particles striking a sphere of radius r – I can produce the image in example_1. I divide the shell into segments and calculate the number of particles falling within each.
I would like to represent the data as a smooth 3d heatmap over the spherical shell. I can produce the image shown in example_2 using scatter3 and a color bar, but I would like a smooth surface. I have tried to follow the example of my previous question using an isosurface –
however ux != uy != uz and I have the "Number of elements must not change" error.
I have also tried meshgrid(), but the size of photons results in an array that excedes maximum size preference.
Is there an easier way to smooth this data?
photons = readmatrix(‘input.txt’);
r = 70; % in unit mm
prop = zeros(length(photons),3);
for i = 1:length(photons)
c(i) = ((photons(i,1)*photons(i,1)) + (photons(i,2)*photons(i,2)) + (photons(i,3)*photons(i,3)) – (r*r));
b(i) = 2*((photons(i,1)*photons(i,7)) + (photons(i,2)*photons(i,8)) + (photons(i,3)*photons(i,9)));
a(i) = ((photons(i,7)*photons(i,7)) + (photons(i,8)*photons(i,8)) + (photons(i,9)*photons(i,9)));
t(i) = (-b(i) + sqrt(b(i).^2 – 4*a(i)*c(i)))/(2*a(i));
prop(i,1) = photons(i,1) + t(i)*photons(i,7);
prop(i,2) = photons(i,2) + t(i)*photons(i,8);
prop(i,3) = photons(i,3) + t(i)*photons(i,9);
prop_sph(i,3) = sqrt(prop(i,1).^2 + prop(i,2).^2 + prop(i,3).^2); % calculate spherical radius (should be r)
prop_sph(i,1) = acos((prop(i,3))/(prop_sph(i,3))); % calculate spherical theta (elevation)
if prop(i,1) > 0 && prop(i,2) >= 0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)); % calculate spherical phi (azimuth)
end
if prop(i,1) > 0 && prop(i,2) < 0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)) + 2*pi;
end
if prop(i,1) < 0 && prop(i,2) >=0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)) + pi;
end
if prop(i,1) < 0 && prop(i,2) >=0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)) + pi;
end
if prop(i,1) < 0 && prop(i,2) < 0
prop_sph(i,2) = (atan(prop(i,2)/prop(i,1)) – pi) + 2*pi ;
end
if prop(i,1) == 0 && prop(i,2) > 0
prop_sph(i,2) = pi / 2;
end
if prop(i,1) == 0 && prop(i,2) < 0
prop_sph(i,2) = (-pi / 2) + 2*pi;
end
if prop(i,1) == 0 && prop(i,2) == 0
prop_sph(i,2) = NaN;
end
end
% plot the photon distribution in Cartesian coordinates.
% scatter3(prop(:,1),prop(:,2),prop(:,3), 10,’k’,’filled’,’MarkerFaceAlpha’,.9);
% sort photons into bins of size d_th*d_phi in spherical coordinates
max_th = pi;
max_phi = 2*pi;
d_th = max_th / 100;
d_phi = max_phi / 100;
l_th = round((max_th / d_th) * (max_phi / d_phi));
theta = (0:d_th:max_th)’;
phi = (0:d_phi:max_phi)’;
mat = [zeros(l_th,1)’; zeros(l_th,1)’; zeros(l_th,1)’;]’;
n = 1;
for j = 1:length(phi)
for i = 1:length(theta)
mat(n,1) = theta(i);
mat(n,2) = phi(j);
n = n+1;
end
end
for w = 1:length(mat)
for k = 1:length(prop_sph)
if (((prop_sph(k,1) >= mat(w,1)) && (prop_sph(k,1) < mat(w,1) + d_th)) && ((prop_sph(k,2) >= mat(w,2)) && (prop_sph(k,2) < mat(w,2) + d_phi)))
mat(w,3) = mat(w,3) + 1;
end
end
end
% ——- convert back to cartesian coordinates and include color data
for i = 1:length(mat)
prop_map_fin(i,1) = prop_sph(i,3)*sin(mat(i,1) + d_th/2)*cos(mat(i,2) + d_phi/2);
prop_map_fin(i,2) = prop_sph(i,3)*sin(mat(i,1) + d_th/2)*sin(mat(i,2) + d_phi/2);
prop_map_fin(i,3) = prop_sph(i,3)*cos(mat(i,1) + d_th/2);
prop_map_fin(i,4) = mat(i,3);
% X = prop_sph(:,3).*sin(prop_sph(:,1)).*cos(prop_sph(:,2));
% Y = prop_sph(:,3).*sin(prop_sph(:,1)).*sin(prop_sph(:,2));
% Z = prop_sph(:,3).*cos(prop_sph(:,1));
end
% — visualize ——————————————————–
%surf(prop_map_fin(:,1),prop_map_fin(:,2),prop_map_fin(:,3),prop_map_fin(:,4))
scatter3(prop_map_fin(:,1),prop_map_fin(:,2),prop_map_fin(:,3), 10,prop_map_fin(:,4), ‘filled’);
cb = colorbar; % create and label the colorbar
cb.Label.String = ”;
% xslice = [5 9.9]; % define the cross sections to view
% yslice = 3;
% zslice = ([-3 0]);
%slice(prop_map_fin(:,1), prop_map_fin(:,2), prop_map_fin(:,3), prop_map_fin(:,4), xslice, yslice, zslice)
%
T = array2table(prop_map_fin);
x = T{:, 1}; y = T{:, 2}; z = T{:, 3}; c2 = T{:, 4};
ux = unique(x); uy = unique(y); uz = unique(z);
data_sorted = sortrows(T, 1:4);
v = reshape(data_sorted{:, 4}, length(ux),length(uy),length(uz));
isosurface(uz, uy, ux, v, 0);
%[X2,Y2,Z2] = meshgrid(prop_map_fin(:,1), prop_map_fin(:,2), prop_map_fin(:,3));
function [x y] = GetCircle(r, h, k, a, b)
t = linspace(a, b, 40);
x = r*cos(t) + h;
y = r*sin(t) + k;
endI have written a code (attached) to plot particles striking a sphere of radius r – I can produce the image in example_1. I divide the shell into segments and calculate the number of particles falling within each.
I would like to represent the data as a smooth 3d heatmap over the spherical shell. I can produce the image shown in example_2 using scatter3 and a color bar, but I would like a smooth surface. I have tried to follow the example of my previous question using an isosurface –
however ux != uy != uz and I have the "Number of elements must not change" error.
I have also tried meshgrid(), but the size of photons results in an array that excedes maximum size preference.
Is there an easier way to smooth this data?
photons = readmatrix(‘input.txt’);
r = 70; % in unit mm
prop = zeros(length(photons),3);
for i = 1:length(photons)
c(i) = ((photons(i,1)*photons(i,1)) + (photons(i,2)*photons(i,2)) + (photons(i,3)*photons(i,3)) – (r*r));
b(i) = 2*((photons(i,1)*photons(i,7)) + (photons(i,2)*photons(i,8)) + (photons(i,3)*photons(i,9)));
a(i) = ((photons(i,7)*photons(i,7)) + (photons(i,8)*photons(i,8)) + (photons(i,9)*photons(i,9)));
t(i) = (-b(i) + sqrt(b(i).^2 – 4*a(i)*c(i)))/(2*a(i));
prop(i,1) = photons(i,1) + t(i)*photons(i,7);
prop(i,2) = photons(i,2) + t(i)*photons(i,8);
prop(i,3) = photons(i,3) + t(i)*photons(i,9);
prop_sph(i,3) = sqrt(prop(i,1).^2 + prop(i,2).^2 + prop(i,3).^2); % calculate spherical radius (should be r)
prop_sph(i,1) = acos((prop(i,3))/(prop_sph(i,3))); % calculate spherical theta (elevation)
if prop(i,1) > 0 && prop(i,2) >= 0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)); % calculate spherical phi (azimuth)
end
if prop(i,1) > 0 && prop(i,2) < 0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)) + 2*pi;
end
if prop(i,1) < 0 && prop(i,2) >=0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)) + pi;
end
if prop(i,1) < 0 && prop(i,2) >=0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)) + pi;
end
if prop(i,1) < 0 && prop(i,2) < 0
prop_sph(i,2) = (atan(prop(i,2)/prop(i,1)) – pi) + 2*pi ;
end
if prop(i,1) == 0 && prop(i,2) > 0
prop_sph(i,2) = pi / 2;
end
if prop(i,1) == 0 && prop(i,2) < 0
prop_sph(i,2) = (-pi / 2) + 2*pi;
end
if prop(i,1) == 0 && prop(i,2) == 0
prop_sph(i,2) = NaN;
end
end
% plot the photon distribution in Cartesian coordinates.
% scatter3(prop(:,1),prop(:,2),prop(:,3), 10,’k’,’filled’,’MarkerFaceAlpha’,.9);
% sort photons into bins of size d_th*d_phi in spherical coordinates
max_th = pi;
max_phi = 2*pi;
d_th = max_th / 100;
d_phi = max_phi / 100;
l_th = round((max_th / d_th) * (max_phi / d_phi));
theta = (0:d_th:max_th)’;
phi = (0:d_phi:max_phi)’;
mat = [zeros(l_th,1)’; zeros(l_th,1)’; zeros(l_th,1)’;]’;
n = 1;
for j = 1:length(phi)
for i = 1:length(theta)
mat(n,1) = theta(i);
mat(n,2) = phi(j);
n = n+1;
end
end
for w = 1:length(mat)
for k = 1:length(prop_sph)
if (((prop_sph(k,1) >= mat(w,1)) && (prop_sph(k,1) < mat(w,1) + d_th)) && ((prop_sph(k,2) >= mat(w,2)) && (prop_sph(k,2) < mat(w,2) + d_phi)))
mat(w,3) = mat(w,3) + 1;
end
end
end
% ——- convert back to cartesian coordinates and include color data
for i = 1:length(mat)
prop_map_fin(i,1) = prop_sph(i,3)*sin(mat(i,1) + d_th/2)*cos(mat(i,2) + d_phi/2);
prop_map_fin(i,2) = prop_sph(i,3)*sin(mat(i,1) + d_th/2)*sin(mat(i,2) + d_phi/2);
prop_map_fin(i,3) = prop_sph(i,3)*cos(mat(i,1) + d_th/2);
prop_map_fin(i,4) = mat(i,3);
% X = prop_sph(:,3).*sin(prop_sph(:,1)).*cos(prop_sph(:,2));
% Y = prop_sph(:,3).*sin(prop_sph(:,1)).*sin(prop_sph(:,2));
% Z = prop_sph(:,3).*cos(prop_sph(:,1));
end
% — visualize ——————————————————–
%surf(prop_map_fin(:,1),prop_map_fin(:,2),prop_map_fin(:,3),prop_map_fin(:,4))
scatter3(prop_map_fin(:,1),prop_map_fin(:,2),prop_map_fin(:,3), 10,prop_map_fin(:,4), ‘filled’);
cb = colorbar; % create and label the colorbar
cb.Label.String = ”;
% xslice = [5 9.9]; % define the cross sections to view
% yslice = 3;
% zslice = ([-3 0]);
%slice(prop_map_fin(:,1), prop_map_fin(:,2), prop_map_fin(:,3), prop_map_fin(:,4), xslice, yslice, zslice)
%
T = array2table(prop_map_fin);
x = T{:, 1}; y = T{:, 2}; z = T{:, 3}; c2 = T{:, 4};
ux = unique(x); uy = unique(y); uz = unique(z);
data_sorted = sortrows(T, 1:4);
v = reshape(data_sorted{:, 4}, length(ux),length(uy),length(uz));
isosurface(uz, uy, ux, v, 0);
%[X2,Y2,Z2] = meshgrid(prop_map_fin(:,1), prop_map_fin(:,2), prop_map_fin(:,3));
function [x y] = GetCircle(r, h, k, a, b)
t = linspace(a, b, 40);
x = r*cos(t) + h;
y = r*sin(t) + k;
end I have written a code (attached) to plot particles striking a sphere of radius r – I can produce the image in example_1. I divide the shell into segments and calculate the number of particles falling within each.
I would like to represent the data as a smooth 3d heatmap over the spherical shell. I can produce the image shown in example_2 using scatter3 and a color bar, but I would like a smooth surface. I have tried to follow the example of my previous question using an isosurface –
however ux != uy != uz and I have the "Number of elements must not change" error.
I have also tried meshgrid(), but the size of photons results in an array that excedes maximum size preference.
Is there an easier way to smooth this data?
photons = readmatrix(‘input.txt’);
r = 70; % in unit mm
prop = zeros(length(photons),3);
for i = 1:length(photons)
c(i) = ((photons(i,1)*photons(i,1)) + (photons(i,2)*photons(i,2)) + (photons(i,3)*photons(i,3)) – (r*r));
b(i) = 2*((photons(i,1)*photons(i,7)) + (photons(i,2)*photons(i,8)) + (photons(i,3)*photons(i,9)));
a(i) = ((photons(i,7)*photons(i,7)) + (photons(i,8)*photons(i,8)) + (photons(i,9)*photons(i,9)));
t(i) = (-b(i) + sqrt(b(i).^2 – 4*a(i)*c(i)))/(2*a(i));
prop(i,1) = photons(i,1) + t(i)*photons(i,7);
prop(i,2) = photons(i,2) + t(i)*photons(i,8);
prop(i,3) = photons(i,3) + t(i)*photons(i,9);
prop_sph(i,3) = sqrt(prop(i,1).^2 + prop(i,2).^2 + prop(i,3).^2); % calculate spherical radius (should be r)
prop_sph(i,1) = acos((prop(i,3))/(prop_sph(i,3))); % calculate spherical theta (elevation)
if prop(i,1) > 0 && prop(i,2) >= 0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)); % calculate spherical phi (azimuth)
end
if prop(i,1) > 0 && prop(i,2) < 0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)) + 2*pi;
end
if prop(i,1) < 0 && prop(i,2) >=0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)) + pi;
end
if prop(i,1) < 0 && prop(i,2) >=0
prop_sph(i,2) = atan(prop(i,2)/prop(i,1)) + pi;
end
if prop(i,1) < 0 && prop(i,2) < 0
prop_sph(i,2) = (atan(prop(i,2)/prop(i,1)) – pi) + 2*pi ;
end
if prop(i,1) == 0 && prop(i,2) > 0
prop_sph(i,2) = pi / 2;
end
if prop(i,1) == 0 && prop(i,2) < 0
prop_sph(i,2) = (-pi / 2) + 2*pi;
end
if prop(i,1) == 0 && prop(i,2) == 0
prop_sph(i,2) = NaN;
end
end
% plot the photon distribution in Cartesian coordinates.
% scatter3(prop(:,1),prop(:,2),prop(:,3), 10,’k’,’filled’,’MarkerFaceAlpha’,.9);
% sort photons into bins of size d_th*d_phi in spherical coordinates
max_th = pi;
max_phi = 2*pi;
d_th = max_th / 100;
d_phi = max_phi / 100;
l_th = round((max_th / d_th) * (max_phi / d_phi));
theta = (0:d_th:max_th)’;
phi = (0:d_phi:max_phi)’;
mat = [zeros(l_th,1)’; zeros(l_th,1)’; zeros(l_th,1)’;]’;
n = 1;
for j = 1:length(phi)
for i = 1:length(theta)
mat(n,1) = theta(i);
mat(n,2) = phi(j);
n = n+1;
end
end
for w = 1:length(mat)
for k = 1:length(prop_sph)
if (((prop_sph(k,1) >= mat(w,1)) && (prop_sph(k,1) < mat(w,1) + d_th)) && ((prop_sph(k,2) >= mat(w,2)) && (prop_sph(k,2) < mat(w,2) + d_phi)))
mat(w,3) = mat(w,3) + 1;
end
end
end
% ——- convert back to cartesian coordinates and include color data
for i = 1:length(mat)
prop_map_fin(i,1) = prop_sph(i,3)*sin(mat(i,1) + d_th/2)*cos(mat(i,2) + d_phi/2);
prop_map_fin(i,2) = prop_sph(i,3)*sin(mat(i,1) + d_th/2)*sin(mat(i,2) + d_phi/2);
prop_map_fin(i,3) = prop_sph(i,3)*cos(mat(i,1) + d_th/2);
prop_map_fin(i,4) = mat(i,3);
% X = prop_sph(:,3).*sin(prop_sph(:,1)).*cos(prop_sph(:,2));
% Y = prop_sph(:,3).*sin(prop_sph(:,1)).*sin(prop_sph(:,2));
% Z = prop_sph(:,3).*cos(prop_sph(:,1));
end
% — visualize ——————————————————–
%surf(prop_map_fin(:,1),prop_map_fin(:,2),prop_map_fin(:,3),prop_map_fin(:,4))
scatter3(prop_map_fin(:,1),prop_map_fin(:,2),prop_map_fin(:,3), 10,prop_map_fin(:,4), ‘filled’);
cb = colorbar; % create and label the colorbar
cb.Label.String = ”;
% xslice = [5 9.9]; % define the cross sections to view
% yslice = 3;
% zslice = ([-3 0]);
%slice(prop_map_fin(:,1), prop_map_fin(:,2), prop_map_fin(:,3), prop_map_fin(:,4), xslice, yslice, zslice)
%
T = array2table(prop_map_fin);
x = T{:, 1}; y = T{:, 2}; z = T{:, 3}; c2 = T{:, 4};
ux = unique(x); uy = unique(y); uz = unique(z);
data_sorted = sortrows(T, 1:4);
v = reshape(data_sorted{:, 4}, length(ux),length(uy),length(uz));
isosurface(uz, uy, ux, v, 0);
%[X2,Y2,Z2] = meshgrid(prop_map_fin(:,1), prop_map_fin(:,2), prop_map_fin(:,3));
function [x y] = GetCircle(r, h, k, a, b)
t = linspace(a, b, 40);
x = r*cos(t) + h;
y = r*sin(t) + k;
end heatmap, contour, scatter, spherical shell, 4d MATLAB Answers — New Questions
Simscape 4-Way 3-Position Directional Valve (IL) No “Fluids/Plot Valve Characteristics” Option
Per the help documentation for this block, there should be a plotting option to help visualize the orifice opening. The instructions are to right click the block and select "Fluids > Plot Valve Characteristics"; however, no Fluids option appears upon right clicking the block. I am using MATLAB R2024a.
The option also does not exist under any of the Format, Mask, or Library Link submenus.
Block documentation: https://www.mathworks.com/help/hydro/ref/4way3positiondirectionalvalveil.htmlPer the help documentation for this block, there should be a plotting option to help visualize the orifice opening. The instructions are to right click the block and select "Fluids > Plot Valve Characteristics"; however, no Fluids option appears upon right clicking the block. I am using MATLAB R2024a.
The option also does not exist under any of the Format, Mask, or Library Link submenus.
Block documentation: https://www.mathworks.com/help/hydro/ref/4way3positiondirectionalvalveil.html Per the help documentation for this block, there should be a plotting option to help visualize the orifice opening. The instructions are to right click the block and select "Fluids > Plot Valve Characteristics"; however, no Fluids option appears upon right clicking the block. I am using MATLAB R2024a.
The option also does not exist under any of the Format, Mask, or Library Link submenus.
Block documentation: https://www.mathworks.com/help/hydro/ref/4way3positiondirectionalvalveil.html simscape, fluids, directinal-valve, r2024a MATLAB Answers — New Questions
Setting Boundary Conditions & Using bvp4c
Hi, I’m having trouble understanding how to use bvp4c. For my assignment, I have created a game that shoots a cannonball at a certain velocity and angle (which are the game inputs), it an attempt to hit a castle (the location is generated by the game).
Now, I need to make a cheat script using bvp4c that when given the position of the castle, outputs a set of velocity and angle values that would make the cannonball hit the castle. The castle is the red square in the image.
sol = = bvp4c(@gamePhysics,@bcfun,solinit)
Here are the two second order ODE’s that describe projectile’s motion:
From there I converted them to these four first order ODE’s:
function dydt = gamePhysics(t,y)
m = 5; % kg
D = 0.013; % N*s^2/m^2
g = 9.81; % m/s^2
dydt = zeros(4,1);
dydt(1) = y(2)
dydt(2) = ((-D/m)*y(2)*(y(2)^2+y(4)^2)^(0.5));
dydt(3) = y(4);
dydt(4) = ((-g)-(D/m)*y(4)*(y(2)^2+y(4)^2)^(0.5));
end
I’m now stuck on making a function that describes the boundary conditions. At the origin, y(0) = 0 and at the castle, y(0) = x_castle.
Also, I’m confused on what the solinit function in bvp4c means. Am I guessing a random velocity and angle?
Thank you! Sorry, I’m pretty lost on how to use this function.Hi, I’m having trouble understanding how to use bvp4c. For my assignment, I have created a game that shoots a cannonball at a certain velocity and angle (which are the game inputs), it an attempt to hit a castle (the location is generated by the game).
Now, I need to make a cheat script using bvp4c that when given the position of the castle, outputs a set of velocity and angle values that would make the cannonball hit the castle. The castle is the red square in the image.
sol = = bvp4c(@gamePhysics,@bcfun,solinit)
Here are the two second order ODE’s that describe projectile’s motion:
From there I converted them to these four first order ODE’s:
function dydt = gamePhysics(t,y)
m = 5; % kg
D = 0.013; % N*s^2/m^2
g = 9.81; % m/s^2
dydt = zeros(4,1);
dydt(1) = y(2)
dydt(2) = ((-D/m)*y(2)*(y(2)^2+y(4)^2)^(0.5));
dydt(3) = y(4);
dydt(4) = ((-g)-(D/m)*y(4)*(y(2)^2+y(4)^2)^(0.5));
end
I’m now stuck on making a function that describes the boundary conditions. At the origin, y(0) = 0 and at the castle, y(0) = x_castle.
Also, I’m confused on what the solinit function in bvp4c means. Am I guessing a random velocity and angle?
Thank you! Sorry, I’m pretty lost on how to use this function. Hi, I’m having trouble understanding how to use bvp4c. For my assignment, I have created a game that shoots a cannonball at a certain velocity and angle (which are the game inputs), it an attempt to hit a castle (the location is generated by the game).
Now, I need to make a cheat script using bvp4c that when given the position of the castle, outputs a set of velocity and angle values that would make the cannonball hit the castle. The castle is the red square in the image.
sol = = bvp4c(@gamePhysics,@bcfun,solinit)
Here are the two second order ODE’s that describe projectile’s motion:
From there I converted them to these four first order ODE’s:
function dydt = gamePhysics(t,y)
m = 5; % kg
D = 0.013; % N*s^2/m^2
g = 9.81; % m/s^2
dydt = zeros(4,1);
dydt(1) = y(2)
dydt(2) = ((-D/m)*y(2)*(y(2)^2+y(4)^2)^(0.5));
dydt(3) = y(4);
dydt(4) = ((-g)-(D/m)*y(4)*(y(2)^2+y(4)^2)^(0.5));
end
I’m now stuck on making a function that describes the boundary conditions. At the origin, y(0) = 0 and at the castle, y(0) = x_castle.
Also, I’m confused on what the solinit function in bvp4c means. Am I guessing a random velocity and angle?
Thank you! Sorry, I’m pretty lost on how to use this function. bvp4c, boundary conditions, ode45 MATLAB Answers — New Questions
inverse kinematics of 7 dof robot using newton raphson method anyone can help. i am not getting desired position of end effector
main()
function main
% Desired end-effector position and orientation
T = [0 1 0 -5;-0.0008 0 1 0.0191;1 0 0.0008 -24; 0 0 0 1];
I = eye(4);
% Initial guess for the joint angles
thetha = [0;0;0;0;0;0;0];
% Tolerance and maximum number of iterations
tolerance = 1e-4;
max_iters = 10000;
alpha = 0.05;
% Main IK loop using Newton-Raphson
for i = 1:max_iters
g = gmatrix(thetha);
G = inv(g);
d = G*T -I ;
% Compute the error between current and desired pose
D = [d(1,4);d(2,4);d(3,4);d(3,2);d(1,3);d(2,1)];
% Check if the solution is within the tolerance
if norm(D) < tolerance
fprintf(‘Converged to a solution after %d iterations.n’, i);
disp(‘Joint angles (radians):’);
disp(thetha);
return;
end
% Compute the Jacobian matrix at the current joint angles
j = jac(thetha);
% Calculate the pseudoinverse of the Jacobian
J_pinv = pinv(j); % Moore-Penrose pseudoinverse
% Update the joint angles
thetha = thetha + alpha*J_pinv * D;
thetha = round(thetha,3);
end
display(thetha)
fprintf(‘Maximum iterations reached without convergence.n’);
a = [0 2 25 3 2 2 1];
a1 = [-1.57 1.57 -1.57 1.57 -1.57 0 0];
d = [0 0 0 0 0 0 0];
th = thetha;
T1=eye(4);
for i=1:7
A=[cos(th(i)) -sin(th(i)) 0 a(i); sin(th(i))*cos(a1(i)) cos(th(i))*cos(a1(i)) -sin(a1(i)) -sin(a1(i))*d(i); sin(th(i))*sin(a1(i)) cos(th(i))*sin(a1(i)) cos(a1(i)) cos(a1(i))*d(i); 0 0 0 1];
T1=T1*A;
end
result = T1
end
function g1 = gmatrix(th)
a = [0 2 25 3 2 2 1];
a1 = [-1.57 1.57 -1.57 1.57 -1.57 0 0];
d = [0 0 0 0 0 0 0];
T=eye(4);
for i=1:7
A=[cos(th(i)) -sin(th(i)) 0 a(i); sin(th(i))*cos(a1(i)) cos(th(i))*cos(a1(i)) -sin(a1(i)) -sin(a1(i))*d(i); sin(th(i))*sin(a1(i)) cos(th(i))*sin(a1(i)) cos(a1(i)) cos(a1(i))*d(i); 0 0 0 1];
T=T*A;
end
g1 = T;
end
function J = jac(th)
a = [0 2 25 3 2 2 1];
a1 = [-1.57 1.57 -1.57 1.57 -1.57 0 0];
d = [0 0 0 0 0 0 0];
T=eye(4);
for i=1:7
A=[cos(th(i)) -sin(th(i)) 0 a(i); sin(th(i))*cos(a1(i)) cos(th(i))*cos(a1(i)) -sin(a1(i)) -sin(a1(i))*d(i); sin(th(i))*sin(a1(i)) cos(th(i))*sin(a1(i)) cos(a1(i)) cos(a1(i))*d(i); 0 0 0 1];
T=T*A;
z(1:3,i)=T(1:3,3);
p(1:3,i)=T(1:3,4);
end
ro = [0; 0; 1;];
J=[cross(ro,p(:,7)) cross(z(:,1),(p(:,7)-p(:,1))) cross(z(:,2),(p(:,7)-p(:,2))) cross(z(:,3),(p(:,7)-p(:,3))) cross(z(:,4),(p(:,7)-p(:,4))) cross(z(:,5),(p(:,7)-p(:,5))) cross(z(:,6),(p(:,7)-p(:,6))) ;ro z(:,1) z(:,2) z(:,3) z(:,4) z(:,5) z(:,6)];
endmain()
function main
% Desired end-effector position and orientation
T = [0 1 0 -5;-0.0008 0 1 0.0191;1 0 0.0008 -24; 0 0 0 1];
I = eye(4);
% Initial guess for the joint angles
thetha = [0;0;0;0;0;0;0];
% Tolerance and maximum number of iterations
tolerance = 1e-4;
max_iters = 10000;
alpha = 0.05;
% Main IK loop using Newton-Raphson
for i = 1:max_iters
g = gmatrix(thetha);
G = inv(g);
d = G*T -I ;
% Compute the error between current and desired pose
D = [d(1,4);d(2,4);d(3,4);d(3,2);d(1,3);d(2,1)];
% Check if the solution is within the tolerance
if norm(D) < tolerance
fprintf(‘Converged to a solution after %d iterations.n’, i);
disp(‘Joint angles (radians):’);
disp(thetha);
return;
end
% Compute the Jacobian matrix at the current joint angles
j = jac(thetha);
% Calculate the pseudoinverse of the Jacobian
J_pinv = pinv(j); % Moore-Penrose pseudoinverse
% Update the joint angles
thetha = thetha + alpha*J_pinv * D;
thetha = round(thetha,3);
end
display(thetha)
fprintf(‘Maximum iterations reached without convergence.n’);
a = [0 2 25 3 2 2 1];
a1 = [-1.57 1.57 -1.57 1.57 -1.57 0 0];
d = [0 0 0 0 0 0 0];
th = thetha;
T1=eye(4);
for i=1:7
A=[cos(th(i)) -sin(th(i)) 0 a(i); sin(th(i))*cos(a1(i)) cos(th(i))*cos(a1(i)) -sin(a1(i)) -sin(a1(i))*d(i); sin(th(i))*sin(a1(i)) cos(th(i))*sin(a1(i)) cos(a1(i)) cos(a1(i))*d(i); 0 0 0 1];
T1=T1*A;
end
result = T1
end
function g1 = gmatrix(th)
a = [0 2 25 3 2 2 1];
a1 = [-1.57 1.57 -1.57 1.57 -1.57 0 0];
d = [0 0 0 0 0 0 0];
T=eye(4);
for i=1:7
A=[cos(th(i)) -sin(th(i)) 0 a(i); sin(th(i))*cos(a1(i)) cos(th(i))*cos(a1(i)) -sin(a1(i)) -sin(a1(i))*d(i); sin(th(i))*sin(a1(i)) cos(th(i))*sin(a1(i)) cos(a1(i)) cos(a1(i))*d(i); 0 0 0 1];
T=T*A;
end
g1 = T;
end
function J = jac(th)
a = [0 2 25 3 2 2 1];
a1 = [-1.57 1.57 -1.57 1.57 -1.57 0 0];
d = [0 0 0 0 0 0 0];
T=eye(4);
for i=1:7
A=[cos(th(i)) -sin(th(i)) 0 a(i); sin(th(i))*cos(a1(i)) cos(th(i))*cos(a1(i)) -sin(a1(i)) -sin(a1(i))*d(i); sin(th(i))*sin(a1(i)) cos(th(i))*sin(a1(i)) cos(a1(i)) cos(a1(i))*d(i); 0 0 0 1];
T=T*A;
z(1:3,i)=T(1:3,3);
p(1:3,i)=T(1:3,4);
end
ro = [0; 0; 1;];
J=[cross(ro,p(:,7)) cross(z(:,1),(p(:,7)-p(:,1))) cross(z(:,2),(p(:,7)-p(:,2))) cross(z(:,3),(p(:,7)-p(:,3))) cross(z(:,4),(p(:,7)-p(:,4))) cross(z(:,5),(p(:,7)-p(:,5))) cross(z(:,6),(p(:,7)-p(:,6))) ;ro z(:,1) z(:,2) z(:,3) z(:,4) z(:,5) z(:,6)];
end main()
function main
% Desired end-effector position and orientation
T = [0 1 0 -5;-0.0008 0 1 0.0191;1 0 0.0008 -24; 0 0 0 1];
I = eye(4);
% Initial guess for the joint angles
thetha = [0;0;0;0;0;0;0];
% Tolerance and maximum number of iterations
tolerance = 1e-4;
max_iters = 10000;
alpha = 0.05;
% Main IK loop using Newton-Raphson
for i = 1:max_iters
g = gmatrix(thetha);
G = inv(g);
d = G*T -I ;
% Compute the error between current and desired pose
D = [d(1,4);d(2,4);d(3,4);d(3,2);d(1,3);d(2,1)];
% Check if the solution is within the tolerance
if norm(D) < tolerance
fprintf(‘Converged to a solution after %d iterations.n’, i);
disp(‘Joint angles (radians):’);
disp(thetha);
return;
end
% Compute the Jacobian matrix at the current joint angles
j = jac(thetha);
% Calculate the pseudoinverse of the Jacobian
J_pinv = pinv(j); % Moore-Penrose pseudoinverse
% Update the joint angles
thetha = thetha + alpha*J_pinv * D;
thetha = round(thetha,3);
end
display(thetha)
fprintf(‘Maximum iterations reached without convergence.n’);
a = [0 2 25 3 2 2 1];
a1 = [-1.57 1.57 -1.57 1.57 -1.57 0 0];
d = [0 0 0 0 0 0 0];
th = thetha;
T1=eye(4);
for i=1:7
A=[cos(th(i)) -sin(th(i)) 0 a(i); sin(th(i))*cos(a1(i)) cos(th(i))*cos(a1(i)) -sin(a1(i)) -sin(a1(i))*d(i); sin(th(i))*sin(a1(i)) cos(th(i))*sin(a1(i)) cos(a1(i)) cos(a1(i))*d(i); 0 0 0 1];
T1=T1*A;
end
result = T1
end
function g1 = gmatrix(th)
a = [0 2 25 3 2 2 1];
a1 = [-1.57 1.57 -1.57 1.57 -1.57 0 0];
d = [0 0 0 0 0 0 0];
T=eye(4);
for i=1:7
A=[cos(th(i)) -sin(th(i)) 0 a(i); sin(th(i))*cos(a1(i)) cos(th(i))*cos(a1(i)) -sin(a1(i)) -sin(a1(i))*d(i); sin(th(i))*sin(a1(i)) cos(th(i))*sin(a1(i)) cos(a1(i)) cos(a1(i))*d(i); 0 0 0 1];
T=T*A;
end
g1 = T;
end
function J = jac(th)
a = [0 2 25 3 2 2 1];
a1 = [-1.57 1.57 -1.57 1.57 -1.57 0 0];
d = [0 0 0 0 0 0 0];
T=eye(4);
for i=1:7
A=[cos(th(i)) -sin(th(i)) 0 a(i); sin(th(i))*cos(a1(i)) cos(th(i))*cos(a1(i)) -sin(a1(i)) -sin(a1(i))*d(i); sin(th(i))*sin(a1(i)) cos(th(i))*sin(a1(i)) cos(a1(i)) cos(a1(i))*d(i); 0 0 0 1];
T=T*A;
z(1:3,i)=T(1:3,3);
p(1:3,i)=T(1:3,4);
end
ro = [0; 0; 1;];
J=[cross(ro,p(:,7)) cross(z(:,1),(p(:,7)-p(:,1))) cross(z(:,2),(p(:,7)-p(:,2))) cross(z(:,3),(p(:,7)-p(:,3))) cross(z(:,4),(p(:,7)-p(:,4))) cross(z(:,5),(p(:,7)-p(:,5))) cross(z(:,6),(p(:,7)-p(:,6))) ;ro z(:,1) z(:,2) z(:,3) z(:,4) z(:,5) z(:,6)];
end matlab, inverse kinematics, 7 dof robot, jacobian matrix MATLAB Answers — New Questions
Can i Synchronize a network Drive with One Drive that synchronizes with Sharepoint?
Hello, We are currently working on a migrating Documents from Shared/Mapped network drive to SharePoint, we didnt use any tools for it as it was around 60GB we were able to just drag and drop all the folders,subfolders and documents. However, We have customers who regularly access the Mapped network drive and update documents in them, and add or move around documents during migration. So we are finding it hard to find what files they have to made changes or added, sorting it by date added every day until they start using Sharepoint is a uphill task as they are not used to Sharepoint and we need to train them use it. I have few questions here. The network drive that the dccuments currently is in is not sycnhronized to one drive, i did find that Onedrive and Sharepoint is able to sycnhronize, example if i create a folder or move folders i able to see One drive and Sharepoint synchronizing the structure(its not backed up but im able to access sharepoint via quick access section inside onedrive and see teh changes), now is there a way i could synchronize onedrive with the shared network drive so any changes in the network drive witll synchronize into onedrive and then those changes will reflect in sharepoint?
1. Is there a way i can synchronise Network drive (here Drive J: to One Drive, that would synchronise files in J>>Onedrive>>SharePoint, until the complete migration/traiing is done to co ordinate the changes?).
Very new to SharePoint Migration, Migration was pretty easy as we just dragged and dropped, but following up with changes and go back to find the changes is becoming tedious. Any help would be much appreciated.
Hello, We are currently working on a migrating Documents from Shared/Mapped network drive to SharePoint, we didnt use any tools for it as it was around 60GB we were able to just drag and drop all the folders,subfolders and documents. However, We have customers who regularly access the Mapped network drive and update documents in them, and add or move around documents during migration. So we are finding it hard to find what files they have to made changes or added, sorting it by date added every day until they start using Sharepoint is a uphill task as they are not used to Sharepoint and we need to train them use it. I have few questions here. The network drive that the dccuments currently is in is not sycnhronized to one drive, i did find that Onedrive and Sharepoint is able to sycnhronize, example if i create a folder or move folders i able to see One drive and Sharepoint synchronizing the structure(its not backed up but im able to access sharepoint via quick access section inside onedrive and see teh changes), now is there a way i could synchronize onedrive with the shared network drive so any changes in the network drive witll synchronize into onedrive and then those changes will reflect in sharepoint?1. Is there a way i can synchronise Network drive (here Drive J: to One Drive, that would synchronise files in J>>Onedrive>>SharePoint, until the complete migration/traiing is done to co ordinate the changes?). Very new to SharePoint Migration, Migration was pretty easy as we just dragged and dropped, but following up with changes and go back to find the changes is becoming tedious. Any help would be much appreciated. Read More
My VBA copies row if cell NOTBLANK but I need target columns in specific order (Code in post)
Windows 10
Excel 2019
In a workbook, I have two worksheets, “Track Data” and “Titles Data”.
In worksheet “Track Data”…
Columns A:J will always have data on each row and Column K may have data in some cells or will be blank
The code below looks at, and down, “Track Data” Column K and where it finds a cell WITH data, it copies Columns A. B, F, G, I, J, K and H to worksheet “Titles Data”, then moves on and does that same for every Cell in “K” that has data.
My issue is that I need the data it copies to “Track Data” to be placed in a specific order of Columns.
Like this.
Track Data Titles Data
Col. A to Col. A
Col. B to Col. B
Col. I to Col. C
Col. J to Col. D
Col. K to Col. E
Col. F to Col. F
Col. G to Col. G
Col. H to Col. H
The code is not mine, I found it on a different site while searching for a way to copy the rows but I have adapted it as best I can to suit my needs.
As this code replaces 1000s of rows of forumulas being entered by VBA and copied down (very slow), this code does the same task but with using formulas.
If there is a better (faster) way of doing this I would also be grateful for any suggestions.
Thank you in advance.
Option Explicit
Sub CopyRowsWithData()
Dim erow As Long, lastrow As Long, i As Long
Dim RngCopy As Range
Application.CutCopyMode = True
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableAnimations = False
End With
With Worksheets(“Track Data”)
lastrow = .Cells(.Rows.Count, 1).End(xlUp).Row
For i = 2 To lastrow
If Trim(.Cells(i, “K”).Value) <> “” Then
Set RngCopy = Application.Union(.Range(“A” & i), .Range(“B” & i), .Range(“I” & i), .Range(“J” & i), .Range(“K” & i), .Range(“F” & i), .Range(“G” & i), .Range(“H” & i))
RngCopy.Copy ‘ copy the Union range
‘ get next empty row in “Sheet2”
erow = Worksheets(“Titles Data”).Cells(Worksheets(“Titles Data”).Rows.Count, 1).End(xlUp).Offset(1, 0).Row
‘ paste in the next empty row
Worksheets(“Titles Data”).Range(“A” & erow).PasteSpecial xlPasteAll
End If
Next i
End With
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.EnableAnimations = True
End With
Application.CutCopyMode = False
End Sub
Windows 10Excel 2019In a workbook, I have two worksheets, “Track Data” and “Titles Data”. In worksheet “Track Data”…Columns A:J will always have data on each row and Column K may have data in some cells or will be blankThe code below looks at, and down, “Track Data” Column K and where it finds a cell WITH data, it copies Columns A. B, F, G, I, J, K and H to worksheet “Titles Data”, then moves on and does that same for every Cell in “K” that has data. My issue is that I need the data it copies to “Track Data” to be placed in a specific order of Columns. Like this. Track Data Titles Data
Col. A to Col. A
Col. B to Col. B
Col. I to Col. C
Col. J to Col. D
Col. K to Col. E
Col. F to Col. F
Col. G to Col. G
Col. H to Col. H The code is not mine, I found it on a different site while searching for a way to copy the rows but I have adapted it as best I can to suit my needs. As this code replaces 1000s of rows of forumulas being entered by VBA and copied down (very slow), this code does the same task but with using formulas. If there is a better (faster) way of doing this I would also be grateful for any suggestions. Thank you in advance. Option Explicit
Sub CopyRowsWithData()
Dim erow As Long, lastrow As Long, i As Long
Dim RngCopy As Range
Application.CutCopyMode = True
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableAnimations = False
End With
With Worksheets(“Track Data”)
lastrow = .Cells(.Rows.Count, 1).End(xlUp).Row
For i = 2 To lastrow
If Trim(.Cells(i, “K”).Value) <> “” Then
Set RngCopy = Application.Union(.Range(“A” & i), .Range(“B” & i), .Range(“I” & i), .Range(“J” & i), .Range(“K” & i), .Range(“F” & i), .Range(“G” & i), .Range(“H” & i))
RngCopy.Copy ‘ copy the Union range
‘ get next empty row in “Sheet2”
erow = Worksheets(“Titles Data”).Cells(Worksheets(“Titles Data”).Rows.Count, 1).End(xlUp).Offset(1, 0).Row
‘ paste in the next empty row
Worksheets(“Titles Data”).Range(“A” & erow).PasteSpecial xlPasteAll
End If
Next i
End With
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.EnableAnimations = True
End With
Application.CutCopyMode = False
End Sub Read More
Not able to fillup continuous dates using Autofill option or Fill handle.
I want to fill up the excel cells with continuous date but while using fill handle the date get repeated.
Here i want to continue dates to the following cells.
Now as i use fill handle to fill up the dates, the dates gets repeated.
I want to fill up the excel cells with continuous date but while using fill handle the date get repeated.Here i want continuous dates in the following cellsHere i want to continue dates to the following cells. Here you see that i used the fill handle but the dates gets repeated.Now as i use fill handle to fill up the dates, the dates gets repeated. Read More
Numeración de títulos de tablas
Hola, necesito ayuda para lograr que en la numeración de títulos de tablas se incluya el número de capitulo el número de tabla y una letra que identifique que parte de la tabla es ej. Tabla I-3a, Tabla I-3b.
Gracias de antemano por su ayuda.
Hola, necesito ayuda para lograr que en la numeración de títulos de tablas se incluya el número de capitulo el número de tabla y una letra que identifique que parte de la tabla es ej. Tabla I-3a, Tabla I-3b.Gracias de antemano por su ayuda. Read More
InvalidRequest with OneDrive delta API
We are developing a service to synchronize drives using the OneDrive API.
We are utilizing delta links to retrieve the next set of changes by saving either the @odata.nextLink or @odata.deltaLink from the response and polling every few minutes to synchronize.
https://graph.microsoft.com/v1.0/me/drive/root/delta?token=latest
While normally it returns successfully, starting around 07:25 on April 25th, we began receiving an invalidRequest response.
Here’s a sample response:
{
“error”: {
“code”: “invalidRequest”,
“message”: “One of the provided arguments is not acceptable.”,
“innerError”: {
“code”: “badArgument”,
“date”: “2024-04-24T23:14:56”,
“request-id”: “xxx”,
“client-request-id”: “xxx”
}
}
}
We haven’t made any changes to the request parameters.
Here’s an example link:
https://graph.microsoft.com/v1.0/me/drive/root/delta?token=xxx&$top=50
Why are we receiving this error?
We are developing a service to synchronize drives using the OneDrive API. We are utilizing delta links to retrieve the next set of changes by saving either the @odata.nextLink or @odata.deltaLink from the response and polling every few minutes to synchronize.https://graph.microsoft.com/v1.0/me/drive/root/delta?token=latest While normally it returns successfully, starting around 07:25 on April 25th, we began receiving an invalidRequest response. Here’s a sample response:{
“error”: {
“code”: “invalidRequest”,
“message”: “One of the provided arguments is not acceptable.”,
“innerError”: {
“code”: “badArgument”,
“date”: “2024-04-24T23:14:56”,
“request-id”: “xxx”,
“client-request-id”: “xxx”
}
}
}We haven’t made any changes to the request parameters.Here’s an example link:https://graph.microsoft.com/v1.0/me/drive/root/delta?token=xxx&$top=50 Why are we receiving this error? Read More
How to save a figure as a geotiff
Im only seeing examples online of saving images as geotifs, I plotted a surface which is bounded by lat and longs. The surface is interpolated from a bunch of singlebeam points, and I can save it as a text file but it only saves the data for the actual points, not the entire surface. What I want to do is save the entire surface so it could be quickly thrown into GIS. Any ideas on where to start with this? Thanks again!Im only seeing examples online of saving images as geotifs, I plotted a surface which is bounded by lat and longs. The surface is interpolated from a bunch of singlebeam points, and I can save it as a text file but it only saves the data for the actual points, not the entire surface. What I want to do is save the entire surface so it could be quickly thrown into GIS. Any ideas on where to start with this? Thanks again! Im only seeing examples online of saving images as geotifs, I plotted a surface which is bounded by lat and longs. The surface is interpolated from a bunch of singlebeam points, and I can save it as a text file but it only saves the data for the actual points, not the entire surface. What I want to do is save the entire surface so it could be quickly thrown into GIS. Any ideas on where to start with this? Thanks again! geotif MATLAB Answers — New Questions
Why two ENVI header files are different?
I have generated ENVI header file using MATLAB code is as follows;
map_info = sprintf(‘UTM, %f, %f, %f, %f, %f, %f, %s, %s, units=Meters’, …
R.XIntrinsicLimits(1), R.YIntrinsicLimits(1), …
R.XWorldLimits(1), R.YWorldLimits(2), …
R.CellExtentInWorldX, R.CellExtentInWorldY, …
R.ColumnsStartFrom, R.CoordinateSystemType);
This is giving following map info
{UTM, 0.500000, 0.500000, 699960.000000, 3300000.000000, 10.000000, 10.000000, north, planar, units=Meters}
While ENVI software generated map info is as follows
map info = {UTM, 1.000, 1.000, 699960.000, 3300000.000, 2.0000000000e+001, 2.0000000000e+001, 43, North, WGS-84, units=Meters}
I request you to please suggest me why this difference has occured and how to get map info generated by ENVI software by using MATLAB.
DevendraI have generated ENVI header file using MATLAB code is as follows;
map_info = sprintf(‘UTM, %f, %f, %f, %f, %f, %f, %s, %s, units=Meters’, …
R.XIntrinsicLimits(1), R.YIntrinsicLimits(1), …
R.XWorldLimits(1), R.YWorldLimits(2), …
R.CellExtentInWorldX, R.CellExtentInWorldY, …
R.ColumnsStartFrom, R.CoordinateSystemType);
This is giving following map info
{UTM, 0.500000, 0.500000, 699960.000000, 3300000.000000, 10.000000, 10.000000, north, planar, units=Meters}
While ENVI software generated map info is as follows
map info = {UTM, 1.000, 1.000, 699960.000, 3300000.000, 2.0000000000e+001, 2.0000000000e+001, 43, North, WGS-84, units=Meters}
I request you to please suggest me why this difference has occured and how to get map info generated by ENVI software by using MATLAB.
Devendra I have generated ENVI header file using MATLAB code is as follows;
map_info = sprintf(‘UTM, %f, %f, %f, %f, %f, %f, %s, %s, units=Meters’, …
R.XIntrinsicLimits(1), R.YIntrinsicLimits(1), …
R.XWorldLimits(1), R.YWorldLimits(2), …
R.CellExtentInWorldX, R.CellExtentInWorldY, …
R.ColumnsStartFrom, R.CoordinateSystemType);
This is giving following map info
{UTM, 0.500000, 0.500000, 699960.000000, 3300000.000000, 10.000000, 10.000000, north, planar, units=Meters}
While ENVI software generated map info is as follows
map info = {UTM, 1.000, 1.000, 699960.000, 3300000.000, 2.0000000000e+001, 2.0000000000e+001, 43, North, WGS-84, units=Meters}
I request you to please suggest me why this difference has occured and how to get map info generated by ENVI software by using MATLAB.
Devendra why two envi header files are different? MATLAB Answers — New Questions
how to load multiple eeg dataset files into matlab?
i have 88 eeg data files, their extension is ‘.set’
they are all in the same folder titled ‘all_data’, i am really new at MATLAB, i am unable to figure out how to load all of them at once in my workspace.
i used the line below to load one file, but doing the same for 88 files is a lot of hassle
eegdata= pop_loadset(‘C:UsersParulDocumentsMATLABsecondary_dataall datasub-01_task-40HzAuditoryEntrainment_eeg.set’)
Please helpi have 88 eeg data files, their extension is ‘.set’
they are all in the same folder titled ‘all_data’, i am really new at MATLAB, i am unable to figure out how to load all of them at once in my workspace.
i used the line below to load one file, but doing the same for 88 files is a lot of hassle
eegdata= pop_loadset(‘C:UsersParulDocumentsMATLABsecondary_dataall datasub-01_task-40HzAuditoryEntrainment_eeg.set’)
Please help i have 88 eeg data files, their extension is ‘.set’
they are all in the same folder titled ‘all_data’, i am really new at MATLAB, i am unable to figure out how to load all of them at once in my workspace.
i used the line below to load one file, but doing the same for 88 files is a lot of hassle
eegdata= pop_loadset(‘C:UsersParulDocumentsMATLABsecondary_dataall datasub-01_task-40HzAuditoryEntrainment_eeg.set’)
Please help load, for loop, code MATLAB Answers — New Questions
I get the illegal instruction error while running an iterative matricial method on the Matlab code in PC
————————————————————————
Illegal instruction detected at Thu Apr 25 13:48:52 2024
————————————————————————
Configuration:
Crash Decoding : Disabled
Default Encoding : windows-1252
MATLAB Architecture: win64
MATLAB Root : D:matlab programa
MATLAB Version : 8.3.0.532 (R2014a)
Operating System : Microsoft Windows 11 Pro
Processor ID : x86 Family 143 Model 113 Stepping 0, AuthenticAMD
Virtual Machine : Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : Version 10.0 (Build 22631)
Fault Count: 1
Abnormal termination:
Illegal instruction
Register State (from fault):
RAX = 00000000ecdf9000 RBX = 00000000ecdfd000
RCX = 00000000043f1190 RDX = 00000000ecf51620
RSP = 00000000043f0fa0 RBP = 00000000043f1cc8
RSI = 000000012ecbacb8 RDI = 00000000043f1cc8
R8 = 0000000000000100 R9 = 00000000ecdfd000
R10 = 0000000000001518 R11 = 0000000000000708
R12 = 0000000000000008 R13 = 00000000000000d8
R14 = 0000000000000008 R15 = 0000000000000008
RIP = 000000012db62162 EFL = 00010216
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x000000012db62162 D:matlab programabinwin64mkl.dll+25108834 xerbla+23000914
[ 1] 0x000000012d160694 D:matlab programabinwin64mkl.dll+14616212 xerbla+12508292
[ 2] 0x000000012d1522e8 D:matlab programabinwin64mkl.dll+14557928 xerbla+12450008
[ 3] 0x000000012c44a7b1 D:matlab programabinwin64mkl.dll+00894897 mkl_cbwr_set+00506561
[ 4] 0x000000012caf38e1 D:matlab programabinwin64mkl.dll+07878881 xerbla+05770961
[ 5] 0x000000012c4515aa D:matlab programabinwin64mkl.dll+00923050 mkl_cbwr_set+00534714
[ 6] 0x000000007fb011d0 D:matlab programabinwin64libmwmathlinalg.dll+00135632 FactorObject::create+00069744
[ 7] 0x000000007fb016aa D:matlab programabinwin64libmwmathlinalg.dll+00136874 FactorObject::create+00070986
[ 8] 0x000000001097c07f D:matlab programabinwin64m_dispatcher.dll+00049279 Mfh_file::dispatch_fh+00001247
[ 9] 0x000000001097c637 D:matlab programabinwin64m_dispatcher.dll+00050743 Mfunction_handle::dispatch+00000487
[ 10] 0x0000000010d1cf97 D:matlab programabinwin64m_interpreter.dll+00511895 MathWorks::MException::MExceptionEnvelope::GetID+00306695
[ 11] 0x0000000010d201c8 D:matlab programabinwin64m_interpreter.dll+00524744 MathWorks::MException::MExceptionEnvelope::GetID+00319544
[ 12] 0x0000000010d1cc38 D:matlab programabinwin64m_interpreter.dll+00511032 MathWorks::MException::MExceptionEnvelope::GetID+00305832
[ 13] 0x0000000010d2644f D:matlab programabinwin64m_interpreter.dll+00549967 MathWorks::MException::MExceptionEnvelope::GetID+00344767
[ 14] 0x0000000010d34962 D:matlab programabinwin64m_interpreter.dll+00608610 MathWorks::MException::MExceptionEnvelope::GetID+00403410
[ 15] 0x0000000010d3192c D:matlab programabinwin64m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 16] 0x0000000010d411c9 D:matlab programabinwin64m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 17] 0x000000001097be4f D:matlab programabinwin64m_dispatcher.dll+00048719 Mfh_file::dispatch_fh+00000687
[ 18] 0x000000001097c77a D:matlab programabinwin64m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 19] 0x0000000010d55e04 D:matlab programabinwin64m_interpreter.dll+00744964 MathWorks::MException::MExceptionEnvelope::GetID+00539764
[ 20] 0x0000000010d40782 D:matlab programabinwin64m_interpreter.dll+00657282 MathWorks::MException::MExceptionEnvelope::GetID+00452082
[ 21] 0x0000000010d33f6f D:matlab programabinwin64m_interpreter.dll+00606063 MathWorks::MException::MExceptionEnvelope::GetID+00400863
[ 22] 0x0000000010d1cd43 D:matlab programabinwin64m_interpreter.dll+00511299 MathWorks::MException::MExceptionEnvelope::GetID+00306099
[ 23] 0x0000000010d2644f D:matlab programabinwin64m_interpreter.dll+00549967 MathWorks::MException::MExceptionEnvelope::GetID+00344767
[ 24] 0x0000000010d29350 D:matlab programabinwin64m_interpreter.dll+00562000 MathWorks::MException::MExceptionEnvelope::GetID+00356800
[ 25] 0x0000000010d4446f D:matlab programabinwin64m_interpreter.dll+00672879 MathWorks::MException::MExceptionEnvelope::GetID+00467679
[ 26] 0x0000000010d445b8 D:matlab programabinwin64m_interpreter.dll+00673208 MathWorks::MException::MExceptionEnvelope::GetID+00468008
[ 27] 0x0000000010d34a2d D:matlab programabinwin64m_interpreter.dll+00608813 MathWorks::MException::MExceptionEnvelope::GetID+00403613
[ 28] 0x0000000010d3192c D:matlab programabinwin64m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 29] 0x0000000010d411c9 D:matlab programabinwin64m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 30] 0x000000001097c00e D:matlab programabinwin64m_dispatcher.dll+00049166 Mfh_file::dispatch_fh+00001134
[ 31] 0x000000001097c77a D:matlab programabinwin64m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 32] 0x0000000010d2cdfe D:matlab programabinwin64m_interpreter.dll+00577022 MathWorks::MException::MExceptionEnvelope::GetID+00371822
[ 33] 0x0000000010da68a7 D:matlab programabinwin64m_interpreter.dll+01075367 inEachVisibleName+00016119
[ 34] 0x0000000010d2ab1a D:matlab programabinwin64m_interpreter.dll+00568090 MathWorks::MException::MExceptionEnvelope::GetID+00362890
[ 35] 0x0000000010d4446f D:matlab programabinwin64m_interpreter.dll+00672879 MathWorks::MException::MExceptionEnvelope::GetID+00467679
[ 36] 0x0000000010d445b8 D:matlab programabinwin64m_interpreter.dll+00673208 MathWorks::MException::MExceptionEnvelope::GetID+00468008
[ 37] 0x0000000010d34a2d D:matlab programabinwin64m_interpreter.dll+00608813 MathWorks::MException::MExceptionEnvelope::GetID+00403613
[ 38] 0x0000000010d3192c D:matlab programabinwin64m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 39] 0x0000000010d411c9 D:matlab programabinwin64m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 40] 0x000000001097c00e D:matlab programabinwin64m_dispatcher.dll+00049166 Mfh_file::dispatch_fh+00001134
[ 41] 0x000000001097c77a D:matlab programabinwin64m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 42] 0x0000000010db4a0e D:matlab programabinwin64m_interpreter.dll+01133070 inValidateLoadedObject+00003486
[ 43] 0x0000000010dbbd95 D:matlab programabinwin64m_interpreter.dll+01162645 inResetInterpreter+00005029
[ 44] 0x0000000010dc0a05 D:matlab programabinwin64m_interpreter.dll+01182213 MathWorks::MException::MExceptionEnvelope::Copy+00010997
[ 45] 0x0000000010dc09d2 D:matlab programabinwin64m_interpreter.dll+01182162 MathWorks::MException::MExceptionEnvelope::Copy+00010946
[ 46] 0x0000000010dc0997 D:matlab programabinwin64m_interpreter.dll+01182103 MathWorks::MException::MExceptionEnvelope::Copy+00010887
[ 47] 0x00000000111ae89c D:matlab programabinwin64m_interpreter.dll+05302428 inMexPutVariable+00004204
[ 48] 0x00000000111aebf6 D:matlab programabinwin64m_interpreter.dll+05303286 inMexPutVariable+00005062
[ 49] 0x00000000111af02e D:matlab programabinwin64m_interpreter.dll+05304366 inMexPutVariable+00006142
[ 50] 0x00000000111af36c D:matlab programabinwin64m_interpreter.dll+05305196 inMexPutVariable+00006972
[ 51] 0x00000000110c0161 D:matlab programabinwin64m_interpreter.dll+04325729 inEvalCmdWithLocalReturn+00000065
[ 52] 0x00000000fb5fbecd D:matlab programabinwin64libmwbridge.dll+00048845 mnDebugPrompt+00000109
[ 53] 0x00000000fb5fcfaf D:matlab programabinwin64libmwbridge.dll+00053167 mnParser+00000735
[ 54] 0x00000000fd0afae4 D:matlab programabinwin64mcr.dll+00195300 mcrInstance::mnParser_on_interpreter_thread+00000036
[ 55] 0x00000000fd093af0 D:matlab programabinwin64mcr.dll+00080624 mcr::runtime::setInterpreterThreadToCurrent+00029488
[ 56] 0x00000000fd093b50 D:matlab programabinwin64mcr.dll+00080720 mcr::runtime::setInterpreterThreadToCurrent+00029584
[ 57] 0x00000000fab6e026 D:matlab programabinwin64uiw.dll+00581670 UIW_IsUserMessage+00000086
[ 58] 0x00000000fab6e705 D:matlab programabinwin64uiw.dll+00583429 UIW_SetGLIMUserMsg+00000117
[ 59] 0x00000000fab6e789 D:matlab programabinwin64uiw.dll+00583561 UIW_SetGLIMUserMsg+00000249
[ 60] 0x00007ff952af5362 C:WindowsSystem32USER32.dll+00217954 GetTopWindow+00000578
[ 61] 0x00007ff952ae547f C:WindowsSystem32USER32.dll+00152703 GetDpiForWindow+00001551
[ 62] 0x00007ff952ae53c6 C:WindowsSystem32USER32.dll+00152518 GetDpiForWindow+00001366
[ 63] 0x00007ff952d533a4 C:WindowsSYSTEM32ntdll.dll+00668580 KiUserCallbackDispatcher+00000036
[ 64] 0x00007ff9500f14d4 C:WindowsSystem32win32u.dll+00005332 NtUserPeekMessage+00000020
[ 65] 0x00007ff952ae267f C:WindowsSystem32USER32.dll+00140927 PeekMessageW+00000463
[ 66] 0x00007ff952ae2399 C:WindowsSystem32USER32.dll+00140185 PeekMessageA+00000105
[ 67] 0x00000000fab1bd4b D:matlab programabinwin64uiw.dll+00245067 UIW_SetCurrentDialog+00000731
[ 68] 0x00000000fab6fbe2 D:matlab programabinwin64uiw.dll+00588770 ws_FreeSystemFont+00000482
[ 69] 0x00000001000e2ed0 D:matlab programabinwin64libmwservices.dll+00995024 services::system_events::PpeDispatchHook::~PpeDispatchHook+00053488
[ 70] 0x00000001000e36a5 D:matlab programabinwin64libmwservices.dll+00997029 services::system_events::PpeDispatchHook::~PpeDispatchHook+00055493
[ 71] 0x00000001000e4330 D:matlab programabinwin64libmwservices.dll+01000240 services::system_events::PpeDispatchHook::~PpeDispatchHook+00058704
[ 72] 0x00000001000ed4c6 D:matlab programabinwin64libmwservices.dll+01037510 sysq::removeProcessPendingEventsHook+00011030
[ 73] 0x00000001000ed7ca D:matlab programabinwin64libmwservices.dll+01038282 svWS_ProcessPendingEvents+00000138
[ 74] 0x00000000fd094b6d D:matlab programabinwin64mcr.dll+00084845 mcr::runtime::setInterpreterThreadToCurrent+00033709
[ 75] 0x00000000fd094e3b D:matlab programabinwin64mcr.dll+00085563 mcr::runtime::setInterpreterThreadToCurrent+00034427
[ 76] 0x00000000fd088b75 D:matlab programabinwin64mcr.dll+00035701 mcrInstantiationError::operator=+00003221
[ 77] 0x00000000fd08bea2 D:matlab programabinwin64mcr.dll+00048802 mcr_invoke_on_interpreter_thread+00001602
[ 78] 0x00000000fa7e6e5d D:matlab programabinwin64MVMLocal.dll+00159325 mvm_server::inproc::LocalFactory::createMVM+00040653
[ 79] 0x00000000fa8bafaa D:matlab programabinwin64mvm.dll+00569258 mvm::detail::SessionImpl::privateSession+00001754
[ 80] 0x00000000fa8bd32a D:matlab programabinwin64mvm.dll+00578346 mvm::detail::SessionImpl::privateSession+00010842
[ 81] 0x00000000fa8bce85 D:matlab programabinwin64mvm.dll+00577157 mvm::detail::SessionImpl::privateSession+00009653
[ 82] 0x0000000140004f79 D:matlab programabinwin64matlab.exe+00020345
[ 83] 0x0000000140006a07 D:matlab programabinwin64matlab.exe+00027143
[ 84] 0x00007ff950e5257d C:WindowsSystem32KERNEL32.DLL+00075133 BaseThreadInitThunk+00000029
[ 85] 0x00007ff952d0aa48 C:WindowsSYSTEM32ntdll.dll+00371272 RtlUserThreadStart+00000040
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.————————————————————————
Illegal instruction detected at Thu Apr 25 13:48:52 2024
————————————————————————
Configuration:
Crash Decoding : Disabled
Default Encoding : windows-1252
MATLAB Architecture: win64
MATLAB Root : D:matlab programa
MATLAB Version : 8.3.0.532 (R2014a)
Operating System : Microsoft Windows 11 Pro
Processor ID : x86 Family 143 Model 113 Stepping 0, AuthenticAMD
Virtual Machine : Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : Version 10.0 (Build 22631)
Fault Count: 1
Abnormal termination:
Illegal instruction
Register State (from fault):
RAX = 00000000ecdf9000 RBX = 00000000ecdfd000
RCX = 00000000043f1190 RDX = 00000000ecf51620
RSP = 00000000043f0fa0 RBP = 00000000043f1cc8
RSI = 000000012ecbacb8 RDI = 00000000043f1cc8
R8 = 0000000000000100 R9 = 00000000ecdfd000
R10 = 0000000000001518 R11 = 0000000000000708
R12 = 0000000000000008 R13 = 00000000000000d8
R14 = 0000000000000008 R15 = 0000000000000008
RIP = 000000012db62162 EFL = 00010216
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x000000012db62162 D:matlab programabinwin64mkl.dll+25108834 xerbla+23000914
[ 1] 0x000000012d160694 D:matlab programabinwin64mkl.dll+14616212 xerbla+12508292
[ 2] 0x000000012d1522e8 D:matlab programabinwin64mkl.dll+14557928 xerbla+12450008
[ 3] 0x000000012c44a7b1 D:matlab programabinwin64mkl.dll+00894897 mkl_cbwr_set+00506561
[ 4] 0x000000012caf38e1 D:matlab programabinwin64mkl.dll+07878881 xerbla+05770961
[ 5] 0x000000012c4515aa D:matlab programabinwin64mkl.dll+00923050 mkl_cbwr_set+00534714
[ 6] 0x000000007fb011d0 D:matlab programabinwin64libmwmathlinalg.dll+00135632 FactorObject::create+00069744
[ 7] 0x000000007fb016aa D:matlab programabinwin64libmwmathlinalg.dll+00136874 FactorObject::create+00070986
[ 8] 0x000000001097c07f D:matlab programabinwin64m_dispatcher.dll+00049279 Mfh_file::dispatch_fh+00001247
[ 9] 0x000000001097c637 D:matlab programabinwin64m_dispatcher.dll+00050743 Mfunction_handle::dispatch+00000487
[ 10] 0x0000000010d1cf97 D:matlab programabinwin64m_interpreter.dll+00511895 MathWorks::MException::MExceptionEnvelope::GetID+00306695
[ 11] 0x0000000010d201c8 D:matlab programabinwin64m_interpreter.dll+00524744 MathWorks::MException::MExceptionEnvelope::GetID+00319544
[ 12] 0x0000000010d1cc38 D:matlab programabinwin64m_interpreter.dll+00511032 MathWorks::MException::MExceptionEnvelope::GetID+00305832
[ 13] 0x0000000010d2644f D:matlab programabinwin64m_interpreter.dll+00549967 MathWorks::MException::MExceptionEnvelope::GetID+00344767
[ 14] 0x0000000010d34962 D:matlab programabinwin64m_interpreter.dll+00608610 MathWorks::MException::MExceptionEnvelope::GetID+00403410
[ 15] 0x0000000010d3192c D:matlab programabinwin64m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 16] 0x0000000010d411c9 D:matlab programabinwin64m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 17] 0x000000001097be4f D:matlab programabinwin64m_dispatcher.dll+00048719 Mfh_file::dispatch_fh+00000687
[ 18] 0x000000001097c77a D:matlab programabinwin64m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 19] 0x0000000010d55e04 D:matlab programabinwin64m_interpreter.dll+00744964 MathWorks::MException::MExceptionEnvelope::GetID+00539764
[ 20] 0x0000000010d40782 D:matlab programabinwin64m_interpreter.dll+00657282 MathWorks::MException::MExceptionEnvelope::GetID+00452082
[ 21] 0x0000000010d33f6f D:matlab programabinwin64m_interpreter.dll+00606063 MathWorks::MException::MExceptionEnvelope::GetID+00400863
[ 22] 0x0000000010d1cd43 D:matlab programabinwin64m_interpreter.dll+00511299 MathWorks::MException::MExceptionEnvelope::GetID+00306099
[ 23] 0x0000000010d2644f D:matlab programabinwin64m_interpreter.dll+00549967 MathWorks::MException::MExceptionEnvelope::GetID+00344767
[ 24] 0x0000000010d29350 D:matlab programabinwin64m_interpreter.dll+00562000 MathWorks::MException::MExceptionEnvelope::GetID+00356800
[ 25] 0x0000000010d4446f D:matlab programabinwin64m_interpreter.dll+00672879 MathWorks::MException::MExceptionEnvelope::GetID+00467679
[ 26] 0x0000000010d445b8 D:matlab programabinwin64m_interpreter.dll+00673208 MathWorks::MException::MExceptionEnvelope::GetID+00468008
[ 27] 0x0000000010d34a2d D:matlab programabinwin64m_interpreter.dll+00608813 MathWorks::MException::MExceptionEnvelope::GetID+00403613
[ 28] 0x0000000010d3192c D:matlab programabinwin64m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 29] 0x0000000010d411c9 D:matlab programabinwin64m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 30] 0x000000001097c00e D:matlab programabinwin64m_dispatcher.dll+00049166 Mfh_file::dispatch_fh+00001134
[ 31] 0x000000001097c77a D:matlab programabinwin64m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 32] 0x0000000010d2cdfe D:matlab programabinwin64m_interpreter.dll+00577022 MathWorks::MException::MExceptionEnvelope::GetID+00371822
[ 33] 0x0000000010da68a7 D:matlab programabinwin64m_interpreter.dll+01075367 inEachVisibleName+00016119
[ 34] 0x0000000010d2ab1a D:matlab programabinwin64m_interpreter.dll+00568090 MathWorks::MException::MExceptionEnvelope::GetID+00362890
[ 35] 0x0000000010d4446f D:matlab programabinwin64m_interpreter.dll+00672879 MathWorks::MException::MExceptionEnvelope::GetID+00467679
[ 36] 0x0000000010d445b8 D:matlab programabinwin64m_interpreter.dll+00673208 MathWorks::MException::MExceptionEnvelope::GetID+00468008
[ 37] 0x0000000010d34a2d D:matlab programabinwin64m_interpreter.dll+00608813 MathWorks::MException::MExceptionEnvelope::GetID+00403613
[ 38] 0x0000000010d3192c D:matlab programabinwin64m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 39] 0x0000000010d411c9 D:matlab programabinwin64m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 40] 0x000000001097c00e D:matlab programabinwin64m_dispatcher.dll+00049166 Mfh_file::dispatch_fh+00001134
[ 41] 0x000000001097c77a D:matlab programabinwin64m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 42] 0x0000000010db4a0e D:matlab programabinwin64m_interpreter.dll+01133070 inValidateLoadedObject+00003486
[ 43] 0x0000000010dbbd95 D:matlab programabinwin64m_interpreter.dll+01162645 inResetInterpreter+00005029
[ 44] 0x0000000010dc0a05 D:matlab programabinwin64m_interpreter.dll+01182213 MathWorks::MException::MExceptionEnvelope::Copy+00010997
[ 45] 0x0000000010dc09d2 D:matlab programabinwin64m_interpreter.dll+01182162 MathWorks::MException::MExceptionEnvelope::Copy+00010946
[ 46] 0x0000000010dc0997 D:matlab programabinwin64m_interpreter.dll+01182103 MathWorks::MException::MExceptionEnvelope::Copy+00010887
[ 47] 0x00000000111ae89c D:matlab programabinwin64m_interpreter.dll+05302428 inMexPutVariable+00004204
[ 48] 0x00000000111aebf6 D:matlab programabinwin64m_interpreter.dll+05303286 inMexPutVariable+00005062
[ 49] 0x00000000111af02e D:matlab programabinwin64m_interpreter.dll+05304366 inMexPutVariable+00006142
[ 50] 0x00000000111af36c D:matlab programabinwin64m_interpreter.dll+05305196 inMexPutVariable+00006972
[ 51] 0x00000000110c0161 D:matlab programabinwin64m_interpreter.dll+04325729 inEvalCmdWithLocalReturn+00000065
[ 52] 0x00000000fb5fbecd D:matlab programabinwin64libmwbridge.dll+00048845 mnDebugPrompt+00000109
[ 53] 0x00000000fb5fcfaf D:matlab programabinwin64libmwbridge.dll+00053167 mnParser+00000735
[ 54] 0x00000000fd0afae4 D:matlab programabinwin64mcr.dll+00195300 mcrInstance::mnParser_on_interpreter_thread+00000036
[ 55] 0x00000000fd093af0 D:matlab programabinwin64mcr.dll+00080624 mcr::runtime::setInterpreterThreadToCurrent+00029488
[ 56] 0x00000000fd093b50 D:matlab programabinwin64mcr.dll+00080720 mcr::runtime::setInterpreterThreadToCurrent+00029584
[ 57] 0x00000000fab6e026 D:matlab programabinwin64uiw.dll+00581670 UIW_IsUserMessage+00000086
[ 58] 0x00000000fab6e705 D:matlab programabinwin64uiw.dll+00583429 UIW_SetGLIMUserMsg+00000117
[ 59] 0x00000000fab6e789 D:matlab programabinwin64uiw.dll+00583561 UIW_SetGLIMUserMsg+00000249
[ 60] 0x00007ff952af5362 C:WindowsSystem32USER32.dll+00217954 GetTopWindow+00000578
[ 61] 0x00007ff952ae547f C:WindowsSystem32USER32.dll+00152703 GetDpiForWindow+00001551
[ 62] 0x00007ff952ae53c6 C:WindowsSystem32USER32.dll+00152518 GetDpiForWindow+00001366
[ 63] 0x00007ff952d533a4 C:WindowsSYSTEM32ntdll.dll+00668580 KiUserCallbackDispatcher+00000036
[ 64] 0x00007ff9500f14d4 C:WindowsSystem32win32u.dll+00005332 NtUserPeekMessage+00000020
[ 65] 0x00007ff952ae267f C:WindowsSystem32USER32.dll+00140927 PeekMessageW+00000463
[ 66] 0x00007ff952ae2399 C:WindowsSystem32USER32.dll+00140185 PeekMessageA+00000105
[ 67] 0x00000000fab1bd4b D:matlab programabinwin64uiw.dll+00245067 UIW_SetCurrentDialog+00000731
[ 68] 0x00000000fab6fbe2 D:matlab programabinwin64uiw.dll+00588770 ws_FreeSystemFont+00000482
[ 69] 0x00000001000e2ed0 D:matlab programabinwin64libmwservices.dll+00995024 services::system_events::PpeDispatchHook::~PpeDispatchHook+00053488
[ 70] 0x00000001000e36a5 D:matlab programabinwin64libmwservices.dll+00997029 services::system_events::PpeDispatchHook::~PpeDispatchHook+00055493
[ 71] 0x00000001000e4330 D:matlab programabinwin64libmwservices.dll+01000240 services::system_events::PpeDispatchHook::~PpeDispatchHook+00058704
[ 72] 0x00000001000ed4c6 D:matlab programabinwin64libmwservices.dll+01037510 sysq::removeProcessPendingEventsHook+00011030
[ 73] 0x00000001000ed7ca D:matlab programabinwin64libmwservices.dll+01038282 svWS_ProcessPendingEvents+00000138
[ 74] 0x00000000fd094b6d D:matlab programabinwin64mcr.dll+00084845 mcr::runtime::setInterpreterThreadToCurrent+00033709
[ 75] 0x00000000fd094e3b D:matlab programabinwin64mcr.dll+00085563 mcr::runtime::setInterpreterThreadToCurrent+00034427
[ 76] 0x00000000fd088b75 D:matlab programabinwin64mcr.dll+00035701 mcrInstantiationError::operator=+00003221
[ 77] 0x00000000fd08bea2 D:matlab programabinwin64mcr.dll+00048802 mcr_invoke_on_interpreter_thread+00001602
[ 78] 0x00000000fa7e6e5d D:matlab programabinwin64MVMLocal.dll+00159325 mvm_server::inproc::LocalFactory::createMVM+00040653
[ 79] 0x00000000fa8bafaa D:matlab programabinwin64mvm.dll+00569258 mvm::detail::SessionImpl::privateSession+00001754
[ 80] 0x00000000fa8bd32a D:matlab programabinwin64mvm.dll+00578346 mvm::detail::SessionImpl::privateSession+00010842
[ 81] 0x00000000fa8bce85 D:matlab programabinwin64mvm.dll+00577157 mvm::detail::SessionImpl::privateSession+00009653
[ 82] 0x0000000140004f79 D:matlab programabinwin64matlab.exe+00020345
[ 83] 0x0000000140006a07 D:matlab programabinwin64matlab.exe+00027143
[ 84] 0x00007ff950e5257d C:WindowsSystem32KERNEL32.DLL+00075133 BaseThreadInitThunk+00000029
[ 85] 0x00007ff952d0aa48 C:WindowsSYSTEM32ntdll.dll+00371272 RtlUserThreadStart+00000040
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help. ————————————————————————
Illegal instruction detected at Thu Apr 25 13:48:52 2024
————————————————————————
Configuration:
Crash Decoding : Disabled
Default Encoding : windows-1252
MATLAB Architecture: win64
MATLAB Root : D:matlab programa
MATLAB Version : 8.3.0.532 (R2014a)
Operating System : Microsoft Windows 11 Pro
Processor ID : x86 Family 143 Model 113 Stepping 0, AuthenticAMD
Virtual Machine : Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : Version 10.0 (Build 22631)
Fault Count: 1
Abnormal termination:
Illegal instruction
Register State (from fault):
RAX = 00000000ecdf9000 RBX = 00000000ecdfd000
RCX = 00000000043f1190 RDX = 00000000ecf51620
RSP = 00000000043f0fa0 RBP = 00000000043f1cc8
RSI = 000000012ecbacb8 RDI = 00000000043f1cc8
R8 = 0000000000000100 R9 = 00000000ecdfd000
R10 = 0000000000001518 R11 = 0000000000000708
R12 = 0000000000000008 R13 = 00000000000000d8
R14 = 0000000000000008 R15 = 0000000000000008
RIP = 000000012db62162 EFL = 00010216
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x000000012db62162 D:matlab programabinwin64mkl.dll+25108834 xerbla+23000914
[ 1] 0x000000012d160694 D:matlab programabinwin64mkl.dll+14616212 xerbla+12508292
[ 2] 0x000000012d1522e8 D:matlab programabinwin64mkl.dll+14557928 xerbla+12450008
[ 3] 0x000000012c44a7b1 D:matlab programabinwin64mkl.dll+00894897 mkl_cbwr_set+00506561
[ 4] 0x000000012caf38e1 D:matlab programabinwin64mkl.dll+07878881 xerbla+05770961
[ 5] 0x000000012c4515aa D:matlab programabinwin64mkl.dll+00923050 mkl_cbwr_set+00534714
[ 6] 0x000000007fb011d0 D:matlab programabinwin64libmwmathlinalg.dll+00135632 FactorObject::create+00069744
[ 7] 0x000000007fb016aa D:matlab programabinwin64libmwmathlinalg.dll+00136874 FactorObject::create+00070986
[ 8] 0x000000001097c07f D:matlab programabinwin64m_dispatcher.dll+00049279 Mfh_file::dispatch_fh+00001247
[ 9] 0x000000001097c637 D:matlab programabinwin64m_dispatcher.dll+00050743 Mfunction_handle::dispatch+00000487
[ 10] 0x0000000010d1cf97 D:matlab programabinwin64m_interpreter.dll+00511895 MathWorks::MException::MExceptionEnvelope::GetID+00306695
[ 11] 0x0000000010d201c8 D:matlab programabinwin64m_interpreter.dll+00524744 MathWorks::MException::MExceptionEnvelope::GetID+00319544
[ 12] 0x0000000010d1cc38 D:matlab programabinwin64m_interpreter.dll+00511032 MathWorks::MException::MExceptionEnvelope::GetID+00305832
[ 13] 0x0000000010d2644f D:matlab programabinwin64m_interpreter.dll+00549967 MathWorks::MException::MExceptionEnvelope::GetID+00344767
[ 14] 0x0000000010d34962 D:matlab programabinwin64m_interpreter.dll+00608610 MathWorks::MException::MExceptionEnvelope::GetID+00403410
[ 15] 0x0000000010d3192c D:matlab programabinwin64m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 16] 0x0000000010d411c9 D:matlab programabinwin64m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 17] 0x000000001097be4f D:matlab programabinwin64m_dispatcher.dll+00048719 Mfh_file::dispatch_fh+00000687
[ 18] 0x000000001097c77a D:matlab programabinwin64m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 19] 0x0000000010d55e04 D:matlab programabinwin64m_interpreter.dll+00744964 MathWorks::MException::MExceptionEnvelope::GetID+00539764
[ 20] 0x0000000010d40782 D:matlab programabinwin64m_interpreter.dll+00657282 MathWorks::MException::MExceptionEnvelope::GetID+00452082
[ 21] 0x0000000010d33f6f D:matlab programabinwin64m_interpreter.dll+00606063 MathWorks::MException::MExceptionEnvelope::GetID+00400863
[ 22] 0x0000000010d1cd43 D:matlab programabinwin64m_interpreter.dll+00511299 MathWorks::MException::MExceptionEnvelope::GetID+00306099
[ 23] 0x0000000010d2644f D:matlab programabinwin64m_interpreter.dll+00549967 MathWorks::MException::MExceptionEnvelope::GetID+00344767
[ 24] 0x0000000010d29350 D:matlab programabinwin64m_interpreter.dll+00562000 MathWorks::MException::MExceptionEnvelope::GetID+00356800
[ 25] 0x0000000010d4446f D:matlab programabinwin64m_interpreter.dll+00672879 MathWorks::MException::MExceptionEnvelope::GetID+00467679
[ 26] 0x0000000010d445b8 D:matlab programabinwin64m_interpreter.dll+00673208 MathWorks::MException::MExceptionEnvelope::GetID+00468008
[ 27] 0x0000000010d34a2d D:matlab programabinwin64m_interpreter.dll+00608813 MathWorks::MException::MExceptionEnvelope::GetID+00403613
[ 28] 0x0000000010d3192c D:matlab programabinwin64m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 29] 0x0000000010d411c9 D:matlab programabinwin64m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 30] 0x000000001097c00e D:matlab programabinwin64m_dispatcher.dll+00049166 Mfh_file::dispatch_fh+00001134
[ 31] 0x000000001097c77a D:matlab programabinwin64m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 32] 0x0000000010d2cdfe D:matlab programabinwin64m_interpreter.dll+00577022 MathWorks::MException::MExceptionEnvelope::GetID+00371822
[ 33] 0x0000000010da68a7 D:matlab programabinwin64m_interpreter.dll+01075367 inEachVisibleName+00016119
[ 34] 0x0000000010d2ab1a D:matlab programabinwin64m_interpreter.dll+00568090 MathWorks::MException::MExceptionEnvelope::GetID+00362890
[ 35] 0x0000000010d4446f D:matlab programabinwin64m_interpreter.dll+00672879 MathWorks::MException::MExceptionEnvelope::GetID+00467679
[ 36] 0x0000000010d445b8 D:matlab programabinwin64m_interpreter.dll+00673208 MathWorks::MException::MExceptionEnvelope::GetID+00468008
[ 37] 0x0000000010d34a2d D:matlab programabinwin64m_interpreter.dll+00608813 MathWorks::MException::MExceptionEnvelope::GetID+00403613
[ 38] 0x0000000010d3192c D:matlab programabinwin64m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 39] 0x0000000010d411c9 D:matlab programabinwin64m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 40] 0x000000001097c00e D:matlab programabinwin64m_dispatcher.dll+00049166 Mfh_file::dispatch_fh+00001134
[ 41] 0x000000001097c77a D:matlab programabinwin64m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 42] 0x0000000010db4a0e D:matlab programabinwin64m_interpreter.dll+01133070 inValidateLoadedObject+00003486
[ 43] 0x0000000010dbbd95 D:matlab programabinwin64m_interpreter.dll+01162645 inResetInterpreter+00005029
[ 44] 0x0000000010dc0a05 D:matlab programabinwin64m_interpreter.dll+01182213 MathWorks::MException::MExceptionEnvelope::Copy+00010997
[ 45] 0x0000000010dc09d2 D:matlab programabinwin64m_interpreter.dll+01182162 MathWorks::MException::MExceptionEnvelope::Copy+00010946
[ 46] 0x0000000010dc0997 D:matlab programabinwin64m_interpreter.dll+01182103 MathWorks::MException::MExceptionEnvelope::Copy+00010887
[ 47] 0x00000000111ae89c D:matlab programabinwin64m_interpreter.dll+05302428 inMexPutVariable+00004204
[ 48] 0x00000000111aebf6 D:matlab programabinwin64m_interpreter.dll+05303286 inMexPutVariable+00005062
[ 49] 0x00000000111af02e D:matlab programabinwin64m_interpreter.dll+05304366 inMexPutVariable+00006142
[ 50] 0x00000000111af36c D:matlab programabinwin64m_interpreter.dll+05305196 inMexPutVariable+00006972
[ 51] 0x00000000110c0161 D:matlab programabinwin64m_interpreter.dll+04325729 inEvalCmdWithLocalReturn+00000065
[ 52] 0x00000000fb5fbecd D:matlab programabinwin64libmwbridge.dll+00048845 mnDebugPrompt+00000109
[ 53] 0x00000000fb5fcfaf D:matlab programabinwin64libmwbridge.dll+00053167 mnParser+00000735
[ 54] 0x00000000fd0afae4 D:matlab programabinwin64mcr.dll+00195300 mcrInstance::mnParser_on_interpreter_thread+00000036
[ 55] 0x00000000fd093af0 D:matlab programabinwin64mcr.dll+00080624 mcr::runtime::setInterpreterThreadToCurrent+00029488
[ 56] 0x00000000fd093b50 D:matlab programabinwin64mcr.dll+00080720 mcr::runtime::setInterpreterThreadToCurrent+00029584
[ 57] 0x00000000fab6e026 D:matlab programabinwin64uiw.dll+00581670 UIW_IsUserMessage+00000086
[ 58] 0x00000000fab6e705 D:matlab programabinwin64uiw.dll+00583429 UIW_SetGLIMUserMsg+00000117
[ 59] 0x00000000fab6e789 D:matlab programabinwin64uiw.dll+00583561 UIW_SetGLIMUserMsg+00000249
[ 60] 0x00007ff952af5362 C:WindowsSystem32USER32.dll+00217954 GetTopWindow+00000578
[ 61] 0x00007ff952ae547f C:WindowsSystem32USER32.dll+00152703 GetDpiForWindow+00001551
[ 62] 0x00007ff952ae53c6 C:WindowsSystem32USER32.dll+00152518 GetDpiForWindow+00001366
[ 63] 0x00007ff952d533a4 C:WindowsSYSTEM32ntdll.dll+00668580 KiUserCallbackDispatcher+00000036
[ 64] 0x00007ff9500f14d4 C:WindowsSystem32win32u.dll+00005332 NtUserPeekMessage+00000020
[ 65] 0x00007ff952ae267f C:WindowsSystem32USER32.dll+00140927 PeekMessageW+00000463
[ 66] 0x00007ff952ae2399 C:WindowsSystem32USER32.dll+00140185 PeekMessageA+00000105
[ 67] 0x00000000fab1bd4b D:matlab programabinwin64uiw.dll+00245067 UIW_SetCurrentDialog+00000731
[ 68] 0x00000000fab6fbe2 D:matlab programabinwin64uiw.dll+00588770 ws_FreeSystemFont+00000482
[ 69] 0x00000001000e2ed0 D:matlab programabinwin64libmwservices.dll+00995024 services::system_events::PpeDispatchHook::~PpeDispatchHook+00053488
[ 70] 0x00000001000e36a5 D:matlab programabinwin64libmwservices.dll+00997029 services::system_events::PpeDispatchHook::~PpeDispatchHook+00055493
[ 71] 0x00000001000e4330 D:matlab programabinwin64libmwservices.dll+01000240 services::system_events::PpeDispatchHook::~PpeDispatchHook+00058704
[ 72] 0x00000001000ed4c6 D:matlab programabinwin64libmwservices.dll+01037510 sysq::removeProcessPendingEventsHook+00011030
[ 73] 0x00000001000ed7ca D:matlab programabinwin64libmwservices.dll+01038282 svWS_ProcessPendingEvents+00000138
[ 74] 0x00000000fd094b6d D:matlab programabinwin64mcr.dll+00084845 mcr::runtime::setInterpreterThreadToCurrent+00033709
[ 75] 0x00000000fd094e3b D:matlab programabinwin64mcr.dll+00085563 mcr::runtime::setInterpreterThreadToCurrent+00034427
[ 76] 0x00000000fd088b75 D:matlab programabinwin64mcr.dll+00035701 mcrInstantiationError::operator=+00003221
[ 77] 0x00000000fd08bea2 D:matlab programabinwin64mcr.dll+00048802 mcr_invoke_on_interpreter_thread+00001602
[ 78] 0x00000000fa7e6e5d D:matlab programabinwin64MVMLocal.dll+00159325 mvm_server::inproc::LocalFactory::createMVM+00040653
[ 79] 0x00000000fa8bafaa D:matlab programabinwin64mvm.dll+00569258 mvm::detail::SessionImpl::privateSession+00001754
[ 80] 0x00000000fa8bd32a D:matlab programabinwin64mvm.dll+00578346 mvm::detail::SessionImpl::privateSession+00010842
[ 81] 0x00000000fa8bce85 D:matlab programabinwin64mvm.dll+00577157 mvm::detail::SessionImpl::privateSession+00009653
[ 82] 0x0000000140004f79 D:matlab programabinwin64matlab.exe+00020345
[ 83] 0x0000000140006a07 D:matlab programabinwin64matlab.exe+00027143
[ 84] 0x00007ff950e5257d C:WindowsSystem32KERNEL32.DLL+00075133 BaseThreadInitThunk+00000029
[ 85] 0x00007ff952d0aa48 C:WindowsSYSTEM32ntdll.dll+00371272 RtlUserThreadStart+00000040
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help. matrix, matlab, iteration MATLAB Answers — New Questions
Error using fmincon function
% Define constants for Antoine’s equation
A = 8.07131;
B = 1730.63;
C = 233.426;
% Define the operating temperature at the outlet of the evaporator (in Celsius)
T = 70; % You can adjust this value based on the actual temperature
% Define the partial pressure of water at the outlet of the evaporator (kPa)
Pi = 30;
% Define the mass flow rate of seawater entering the evaporator (in kg/s)
Fseawater = 0.020; % kg/s
% Define the objective function to maximize water recovery
objective = @(x_vap) -calculate_water_recovery(x_vap, A, B, C, T, Pi, Fseawater);
% Define lower and upper bounds for the decision variable (mole fraction of water in vapor phase)
lb = 0; % Lower bound
ub = 1; % Upper bound
constraint = @(x) 20 – calculate_water_recovery(x, A, B, C, T, Pi, Fseawater);
% Perform optimization
options = optimoptions(‘fmincon’, ‘Display’, ‘iter’);
[x_vap_opt, ~, exitflag] = fmincon(objective, 0.5, [], [], [], [], lb, ub, [], [], options);
if exitflag > 0
% Calculate water recovery and display results
[Lwater, Vwater] = calculate_water_recovery(x_vap_opt, A, B, C, T, Pi, Fseawater);
disp([‘Optimal mole fraction of water in vapor phase: ‘, num2str(x_vap_opt)]);
disp([‘Optimal mass flow rate of freshwater product: ‘, num2str(Vwater), ‘ kg/s’]);
disp([‘Optimal percent water recovered: ‘, num2str(Lwater), ‘%’]);
else
disp(‘Optimization failed to converge.’);
end
function [Lwater, Vwater] = calculate_water_recovery(xi_vap, A, B, C, T, Pi, Fseawater)
% Calculate the saturation vapor pressure using Antoine’s equation
Pisat = exp(A – B / (C + T));
% Calculate the mole fraction of water in the liquid phase using Raoult’s law
xi_liq = Pi / Pisat;
% Calculate the mole fraction of water in the vapor phase
xi_vap = 1 – xi_liq;
% Calculate the mass flow rate of freshwater product
Vwater = xi_vap * (0.0180153); % kg/s
% Calculate the percent water recovered
Lwater = (1 – (Fseawater – Vwater) / Fseawater) * 100;
end% Define constants for Antoine’s equation
A = 8.07131;
B = 1730.63;
C = 233.426;
% Define the operating temperature at the outlet of the evaporator (in Celsius)
T = 70; % You can adjust this value based on the actual temperature
% Define the partial pressure of water at the outlet of the evaporator (kPa)
Pi = 30;
% Define the mass flow rate of seawater entering the evaporator (in kg/s)
Fseawater = 0.020; % kg/s
% Define the objective function to maximize water recovery
objective = @(x_vap) -calculate_water_recovery(x_vap, A, B, C, T, Pi, Fseawater);
% Define lower and upper bounds for the decision variable (mole fraction of water in vapor phase)
lb = 0; % Lower bound
ub = 1; % Upper bound
constraint = @(x) 20 – calculate_water_recovery(x, A, B, C, T, Pi, Fseawater);
% Perform optimization
options = optimoptions(‘fmincon’, ‘Display’, ‘iter’);
[x_vap_opt, ~, exitflag] = fmincon(objective, 0.5, [], [], [], [], lb, ub, [], [], options);
if exitflag > 0
% Calculate water recovery and display results
[Lwater, Vwater] = calculate_water_recovery(x_vap_opt, A, B, C, T, Pi, Fseawater);
disp([‘Optimal mole fraction of water in vapor phase: ‘, num2str(x_vap_opt)]);
disp([‘Optimal mass flow rate of freshwater product: ‘, num2str(Vwater), ‘ kg/s’]);
disp([‘Optimal percent water recovered: ‘, num2str(Lwater), ‘%’]);
else
disp(‘Optimization failed to converge.’);
end
function [Lwater, Vwater] = calculate_water_recovery(xi_vap, A, B, C, T, Pi, Fseawater)
% Calculate the saturation vapor pressure using Antoine’s equation
Pisat = exp(A – B / (C + T));
% Calculate the mole fraction of water in the liquid phase using Raoult’s law
xi_liq = Pi / Pisat;
% Calculate the mole fraction of water in the vapor phase
xi_vap = 1 – xi_liq;
% Calculate the mass flow rate of freshwater product
Vwater = xi_vap * (0.0180153); % kg/s
% Calculate the percent water recovered
Lwater = (1 – (Fseawater – Vwater) / Fseawater) * 100;
end % Define constants for Antoine’s equation
A = 8.07131;
B = 1730.63;
C = 233.426;
% Define the operating temperature at the outlet of the evaporator (in Celsius)
T = 70; % You can adjust this value based on the actual temperature
% Define the partial pressure of water at the outlet of the evaporator (kPa)
Pi = 30;
% Define the mass flow rate of seawater entering the evaporator (in kg/s)
Fseawater = 0.020; % kg/s
% Define the objective function to maximize water recovery
objective = @(x_vap) -calculate_water_recovery(x_vap, A, B, C, T, Pi, Fseawater);
% Define lower and upper bounds for the decision variable (mole fraction of water in vapor phase)
lb = 0; % Lower bound
ub = 1; % Upper bound
constraint = @(x) 20 – calculate_water_recovery(x, A, B, C, T, Pi, Fseawater);
% Perform optimization
options = optimoptions(‘fmincon’, ‘Display’, ‘iter’);
[x_vap_opt, ~, exitflag] = fmincon(objective, 0.5, [], [], [], [], lb, ub, [], [], options);
if exitflag > 0
% Calculate water recovery and display results
[Lwater, Vwater] = calculate_water_recovery(x_vap_opt, A, B, C, T, Pi, Fseawater);
disp([‘Optimal mole fraction of water in vapor phase: ‘, num2str(x_vap_opt)]);
disp([‘Optimal mass flow rate of freshwater product: ‘, num2str(Vwater), ‘ kg/s’]);
disp([‘Optimal percent water recovered: ‘, num2str(Lwater), ‘%’]);
else
disp(‘Optimization failed to converge.’);
end
function [Lwater, Vwater] = calculate_water_recovery(xi_vap, A, B, C, T, Pi, Fseawater)
% Calculate the saturation vapor pressure using Antoine’s equation
Pisat = exp(A – B / (C + T));
% Calculate the mole fraction of water in the liquid phase using Raoult’s law
xi_liq = Pi / Pisat;
% Calculate the mole fraction of water in the vapor phase
xi_vap = 1 – xi_liq;
% Calculate the mass flow rate of freshwater product
Vwater = xi_vap * (0.0180153); % kg/s
% Calculate the percent water recovered
Lwater = (1 – (Fseawater – Vwater) / Fseawater) * 100;
end fmincon, constraints MATLAB Answers — New Questions