Month: August 2024
How does Windows 11 perform for dual booting and sharing drives with Windows 10?
I have a customized Windows 10 Pro setup on my current machine, and I’m interested in adding Windows 11 Pro on a different SSD drive while ensuring both operating systems can access a third SSD drive. For instance, I plan to use Windows 10 for photo editing with files on drive 3, and Windows 11 for video editing with the same drive 3 files.
Is it possible to achieve this without encountering issues such as ‘drive access denied’ when accessing drive 3 from either Windows 10 or Windows 11? Additionally, do you have any other tips or recommendations for this setup?
Thank you.
I have a customized Windows 10 Pro setup on my current machine, and I’m interested in adding Windows 11 Pro on a different SSD drive while ensuring both operating systems can access a third SSD drive. For instance, I plan to use Windows 10 for photo editing with files on drive 3, and Windows 11 for video editing with the same drive 3 files. Is it possible to achieve this without encountering issues such as ‘drive access denied’ when accessing drive 3 from either Windows 10 or Windows 11? Additionally, do you have any other tips or recommendations for this setup? Thank you. Read More
Help Please
I have a spreadsheet where The date is in one column and whether the item has been actioned is another column.
I currently use a COUNTIF formula to show a total for each category (Not Started / In Progress / Completed), however the data goes back over three years.
I am looking for a formula where I can show each categories number value for each year.
I have a spreadsheet where The date is in one column and whether the item has been actioned is another column.I currently use a COUNTIF formula to show a total for each category (Not Started / In Progress / Completed), however the data goes back over three years.I am looking for a formula where I can show each categories number value for each year. Read More
Compare data- plz help asap
hi all,
im new to excel and need help very urgently with my data
I have 2 sets of data open on 2 separate tabs and i must combine them to compare –>through a chart then make a graph, however when i tried to paste data set #1 to data set #2 as a second sheet it does not do anything other than say “pasting in progress” (it has been about an hour) please advise. I followed some basic steps given from a microsoft rep but it also didnt work out
hi all,im new to excel and need help very urgently with my dataI have 2 sets of data open on 2 separate tabs and i must combine them to compare –>through a chart then make a graph, however when i tried to paste data set #1 to data set #2 as a second sheet it does not do anything other than say “pasting in progress” (it has been about an hour) please advise. I followed some basic steps given from a microsoft rep but it also didnt work out Read More
Graphic display problem after using normalized coordinates in Matlab
Hi,guys.
I encountered a problem. That is, when I use normalized coordinates, no matter how I adjust the diameter of my target circle, there is no change in the image. I can feel the change in the coordinates. But I don’t need this. I want the entire image to change after adjusting the diameter.
Here are the codes:
function startTask()
targetCenters = zeros(8, 2);
angles = linspace(0, 2*pi, 9);
angles = angles(1:end-1);
radii = 0.3;
waitingForNextTarget = false;
firstMove = true;
resetPosition = [0, 0];
targetSequence = [1,3,5,7,2,4,6,8,8,6,4,2,7,5,3,1];
currentSequenceIndex = 1;
for i = 1:length(angles)
targetCenters(i, 1) = radii * cos(angles(i));
targetCenters(i, 2) = radii * sin(angles(i));
end
targetActivated = false;
currentTarget = 0;
hoverStartTime = [];
cyclesCompleted = 0;
maxCycles = 64;
mousePath = [];
mouseDot = [];
x = 0;
y = 0;
timerObj = timer(‘TimerFcn’, @recordMousePos, ‘Period’, 0.02 , ‘ExecutionMode’, ‘fixedRate’);
checkTargetTimer = timer(‘TimerFcn’, @checkAndActivateTarget, ‘Period’, 0.02 , ‘ExecutionMode’, ‘fixedRate’);
start(checkTargetTimer);
fig = figure(‘Color’, ‘black’, ‘Pointer’, ‘custom’, ‘Units’, ‘normalized’, ‘Position’, [0 0 1 1], ‘MenuBar’, ‘none’, ‘ToolBar’, ‘none’);
ax = axes(‘Color’, ‘black’, ‘Units’, ‘normalized’, ‘Position’, [0 0 1 1], ‘DataAspectRatio’, [1 1 1]);
axis off;
hold on;
drawCircles();
set(fig, ‘WindowButtonMotionFcn’, @mouseMoved);
setInvisibleCursor();
showBlackPanelScreen(2)
resetMouseAndDotPositionToCenter();
activateRandomTarget();
function setInvisibleCursor()
transparentCursor = NaN(16, 16);
hotspot = [8, 8];
set(fig, ‘Pointer’, ‘custom’, ‘PointerShapeCData’, transparentCursor, ‘PointerShapeHotSpot’, hotspot);
end
function drawCircles()
angles = linspace(0, 2*pi, 9);
angles = angles(1:end-1);
circleDiameter = radii * 0.2;
%axis equal;
for i = 1:length(angles)
x = radii * cos(angles(i));
y = radii * sin(angles(i));
rectangle(‘Position’, [x – circleDiameter/2, y – circleDiameter/2, circleDiameter, circleDiameter], ‘Curvature’, [1, 1], ‘EdgeColor’, ‘w’, ‘FaceColor’, ‘k’, ‘LineStyle’, ‘–‘, ‘LineWidth’, 3, ‘UserData’, i);
end
end
SichengHi,guys.
I encountered a problem. That is, when I use normalized coordinates, no matter how I adjust the diameter of my target circle, there is no change in the image. I can feel the change in the coordinates. But I don’t need this. I want the entire image to change after adjusting the diameter.
Here are the codes:
function startTask()
targetCenters = zeros(8, 2);
angles = linspace(0, 2*pi, 9);
angles = angles(1:end-1);
radii = 0.3;
waitingForNextTarget = false;
firstMove = true;
resetPosition = [0, 0];
targetSequence = [1,3,5,7,2,4,6,8,8,6,4,2,7,5,3,1];
currentSequenceIndex = 1;
for i = 1:length(angles)
targetCenters(i, 1) = radii * cos(angles(i));
targetCenters(i, 2) = radii * sin(angles(i));
end
targetActivated = false;
currentTarget = 0;
hoverStartTime = [];
cyclesCompleted = 0;
maxCycles = 64;
mousePath = [];
mouseDot = [];
x = 0;
y = 0;
timerObj = timer(‘TimerFcn’, @recordMousePos, ‘Period’, 0.02 , ‘ExecutionMode’, ‘fixedRate’);
checkTargetTimer = timer(‘TimerFcn’, @checkAndActivateTarget, ‘Period’, 0.02 , ‘ExecutionMode’, ‘fixedRate’);
start(checkTargetTimer);
fig = figure(‘Color’, ‘black’, ‘Pointer’, ‘custom’, ‘Units’, ‘normalized’, ‘Position’, [0 0 1 1], ‘MenuBar’, ‘none’, ‘ToolBar’, ‘none’);
ax = axes(‘Color’, ‘black’, ‘Units’, ‘normalized’, ‘Position’, [0 0 1 1], ‘DataAspectRatio’, [1 1 1]);
axis off;
hold on;
drawCircles();
set(fig, ‘WindowButtonMotionFcn’, @mouseMoved);
setInvisibleCursor();
showBlackPanelScreen(2)
resetMouseAndDotPositionToCenter();
activateRandomTarget();
function setInvisibleCursor()
transparentCursor = NaN(16, 16);
hotspot = [8, 8];
set(fig, ‘Pointer’, ‘custom’, ‘PointerShapeCData’, transparentCursor, ‘PointerShapeHotSpot’, hotspot);
end
function drawCircles()
angles = linspace(0, 2*pi, 9);
angles = angles(1:end-1);
circleDiameter = radii * 0.2;
%axis equal;
for i = 1:length(angles)
x = radii * cos(angles(i));
y = radii * sin(angles(i));
rectangle(‘Position’, [x – circleDiameter/2, y – circleDiameter/2, circleDiameter, circleDiameter], ‘Curvature’, [1, 1], ‘EdgeColor’, ‘w’, ‘FaceColor’, ‘k’, ‘LineStyle’, ‘–‘, ‘LineWidth’, 3, ‘UserData’, i);
end
end
Sicheng Hi,guys.
I encountered a problem. That is, when I use normalized coordinates, no matter how I adjust the diameter of my target circle, there is no change in the image. I can feel the change in the coordinates. But I don’t need this. I want the entire image to change after adjusting the diameter.
Here are the codes:
function startTask()
targetCenters = zeros(8, 2);
angles = linspace(0, 2*pi, 9);
angles = angles(1:end-1);
radii = 0.3;
waitingForNextTarget = false;
firstMove = true;
resetPosition = [0, 0];
targetSequence = [1,3,5,7,2,4,6,8,8,6,4,2,7,5,3,1];
currentSequenceIndex = 1;
for i = 1:length(angles)
targetCenters(i, 1) = radii * cos(angles(i));
targetCenters(i, 2) = radii * sin(angles(i));
end
targetActivated = false;
currentTarget = 0;
hoverStartTime = [];
cyclesCompleted = 0;
maxCycles = 64;
mousePath = [];
mouseDot = [];
x = 0;
y = 0;
timerObj = timer(‘TimerFcn’, @recordMousePos, ‘Period’, 0.02 , ‘ExecutionMode’, ‘fixedRate’);
checkTargetTimer = timer(‘TimerFcn’, @checkAndActivateTarget, ‘Period’, 0.02 , ‘ExecutionMode’, ‘fixedRate’);
start(checkTargetTimer);
fig = figure(‘Color’, ‘black’, ‘Pointer’, ‘custom’, ‘Units’, ‘normalized’, ‘Position’, [0 0 1 1], ‘MenuBar’, ‘none’, ‘ToolBar’, ‘none’);
ax = axes(‘Color’, ‘black’, ‘Units’, ‘normalized’, ‘Position’, [0 0 1 1], ‘DataAspectRatio’, [1 1 1]);
axis off;
hold on;
drawCircles();
set(fig, ‘WindowButtonMotionFcn’, @mouseMoved);
setInvisibleCursor();
showBlackPanelScreen(2)
resetMouseAndDotPositionToCenter();
activateRandomTarget();
function setInvisibleCursor()
transparentCursor = NaN(16, 16);
hotspot = [8, 8];
set(fig, ‘Pointer’, ‘custom’, ‘PointerShapeCData’, transparentCursor, ‘PointerShapeHotSpot’, hotspot);
end
function drawCircles()
angles = linspace(0, 2*pi, 9);
angles = angles(1:end-1);
circleDiameter = radii * 0.2;
%axis equal;
for i = 1:length(angles)
x = radii * cos(angles(i));
y = radii * sin(angles(i));
rectangle(‘Position’, [x – circleDiameter/2, y – circleDiameter/2, circleDiameter, circleDiameter], ‘Curvature’, [1, 1], ‘EdgeColor’, ‘w’, ‘FaceColor’, ‘k’, ‘LineStyle’, ‘–‘, ‘LineWidth’, 3, ‘UserData’, i);
end
end
Sicheng graphics,, normalized coordinates MATLAB Answers — New Questions
obtaining single polynomial equation using Heun’s method from 4 second order differential equations
I get this error when trying to solve these 4 second order differential equations using a program that solves them using Heun’s method and then Gaussian elimination to get a polynomial equation the represents the system. Previsouly posted for help, but the soluitions have symbolics and I need a singular soluition that represents all 4 equations. Does any one have a suggestion on how I can slove this? Is using the "function" with all 4 equations the best way to do this, or is there a nicer method for doing this?
clear,close,clc
%______________________________________________________________SOLUITION_2_Heun’s_Method_(for second order differential equations)_&__Least-Square_Nethod____________________________________________________________%
%4 Equations representing the system working with
% MfXf"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)-Xf’)-(Kf*Xf);
% MrXr"=Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)-(Kr*Xr) ;
% MbXb"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)]-Xf’)+Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)+fa(t);
% Ic*theta"={-[Ksf(Xf-(L1*theta))*L1]-[Bsf(Xf’-(L1*theta’))*L1]+[Ksr(Xr+(L2*theta))*L2]+[Bsr(Xr’+(L2*theta’))*L2]+[fa(t)*L3]};
%————————————————-SYSTEM_PARAMETERS———————————————————————————————————————————————————-
Ic=1356; %kg-m^2
Mb=730; %kg
Mf=59; %kg
Mr=45; %kg
Kf=23000; %N/m
Ksf=18750; %N/m
Kr=16182; %N/m
Ksr=12574; %N/m
Bsf=100; %N*s/m
Bsr=100; %N*s/m
L1=1.45; %m
L2=1.39; %m
L3=0.67; %m
t0=0; %time at the start
tm=20; %what value of (t time) you are ending at
t=t0:tm; % time from time start to time finish seconds
n=4; %order of the polynomial
%Initial Conditions-system at rest therefore x(0)=0 dXf/dt(0)=0 dXr/dt(0)=0 dXb/dt(0)=0 dtheta/dt(0)=0 ;
%time from 0 to 20 h=dx=5;
x0=0; %x at initial condition
y0=0; %y at initial condition
dx=5; %delta(x) or h
h=dx;
%==INPUT SECTION for Euler’s and Heun’s==%
fx=@(x,y,t)y;
fy=@(x,y,t)Projectfunction;
%==CALCULATIONS SECTION==%
tn=t0:h:tm;
xn(1) = x0;
yn(1) = y0;
for i=1:length(tn)
%==EULER’S METHOD
xn(i+1)=xn(i)+fx(xn(i),yn(i),tn(i))*h;
yn(i+1)=yn(i)+fy(xn(i),yn(i),tn(i))*h;
%==NEXT 3 LINES ARE FOR HEUN’S METHOD
tn(i+1)=tn(i)+h;
xn(i+1)=xn(i)+0.5*(fx(xn(i),yn(i),tn(i))+fx(xn(i+1),yn(i+1),tn(i+1)))*h;
yn(i+1)=yn(i)+0.5*(fy(xn(i),yn(i),tn(i))+fy(xn(i+1),yn(i+1),tn(i+1)))*h;
fprintf(‘t=%0.2ft y=%0.3ft z=%0.3fn’,tn(i),xn(i),yn(i))
end
%%%LEAST SQUARE METHOD-FINDS POLYNOMIAL FOR GIVEN DATA SET%%%%%
%INPUT SECTION for Least-Square
X=xn;
Y=yn;
%%__CALCULATIONS SECTION__%%
k=length(X); %NUMBER OF AVAILABLE DATA POINTS
m=n+1; %SIZE OF THE COEFFICENT MATRIX
A=zeros(m,m); %COEFFICENT MATRIX
for j=1:m
for i=1:m
A(j,i)=sum(X.^(i+j-2));
end
end
B=zeros(m,1); %FORCING FUNCTION VECTOR
for i=1:m;
B(i)=sum(Y.*X.^(i-1));
end
a1=AB %COEFFICIENTS FOR THE POLYNOMINAL–> y=a0+a1*x+a2*x^2….an*x^n CAN BE REPLACED BY GAUSSIAN ELIMINATION
%%%%%=========GAUSSIAN ELIMINATION TO FIND "a"========%%%%%%
%%%INPUT SECTION
%CALCULATION SECTION
AB=[A B]; %Augumentent matrix
R=size(AB,1); %# OF ROWS IN AB
C=size(AB,2); %# OF COLUMNS IN AB
%%%%FOWARD ELIMINATION SECTION
for J=1:R-1
[M,I]=max(abs(AB(J:R,J))); %M=MAXIMUM VALUE, I=LOCATION OF THE MAXIMUM VALUE IN THE 1ST ROW
temp=AB(J,:);
AB(J,:)=AB(I+(J-1),:);
AB(I+(J-1),:)=temp;
for i=(J+1):R;
if AB(i,J)~=0;
AB(i,:)=AB(i,:)-(AB(i,J)/AB(J,J))*AB(J,:);
end
end
end
%%%%BACKWARDS SUBSTITUTION
a(R)=AB(R,C)/AB(R,R);
for i=R-1:-1:1
a(i)=(AB(i,C)-AB(i,i+1:R)*a(i+1:R)’)/AB(i,i);
end
disp(a)
syms X
P=0;
for i=1:m;
TT=a(i)*X^(i-1); %T=INDIVIDUAL POLYNOMIAL TERMS
P=P+TT;
end
display(P)
%========END OF GAUSSIAN ELIMINATION=======%%%%%%%%
%STANDARD DEVIATION
Y_bar=mean(Y); %ADVERAGE OF y
St=sum((Y-Y_bar).^2);
SD=sqrt(St/(k-1)); %STANDARD DEVIATION
%STANDARD ERROR
for i=1:m;
T(:,i)=a(i)*X.^(i-1); %T=INDIVIDUAL POLYNOMIAL TERMS
end
for i=1:k
y_hat(i)=sum(T(i,:));
end
Sr=sum((Y-y_hat).^2);
Se=sqrt(Sr/(k-(n+1))); %STANDARD ERROR-Se
%COEFFICIENT OF DETERMINATION
Cd=(St-Sr)/St %COEFFICIENT OF DETERMINATION (r^2)
Cd = 1.0000
fprintf(‘For n=%d. Coefficient of Determination=%0.5fn’,n,Cd)
function [dydt] = Projectfunction(t,x,y)
Ic=1356; %kg-m^2
Mb=730; %kg
Mf=59; %kg
Mr=45; %kg
Kf=23000; %N/m
Ksf=18750; %N/m
Kr=16182; %N/m
Ksr=12574; %N/m
Bsf=100; %N*s/m
Bsr=100; %N*s/m
L1=1.45; %m
L2=1.39; %m
L3=0.67; %m
x1 = x(1); %x1=Xf
x2 = x(2); %x2=Xr
x3 = x(3); %x3=Xb
x4 = x(4); %x4=theta
y1 = y(1); %y1=Xf’=dXf/dt
y2 = y(2); %y2=Xr’=dXr/dt
y3 = y(3); %y3=Xb’=dXb/dt
y4 = y(4); %y4=theta’=dtheta/dt
dydt1 = (Ksf*((x3-(L1*x4)))-x1)+Bsf*((y3-(L1*y4)-y1)-(Kf*x1))/Mf;
dydt2 = (Ksr*((x3+(L2*x4))-x2)+Bsr*((y3+(L2*y4))-y2)-(Kr*x2))/Mr;
dydt3 = (Ksf*((x3-(L1*x4))-x1)+Bsf*((y3-(L1*y4))-y1)+Ksr*((x3+(L2*x4))-x2)+Bsr*((y3+(L2*y4))-y2)-(10*exp(-(5*t))))/Mb;
dydt4 = ((-(Ksf*(x1-(L1*x4))*L1)-(Bsf*(y1-(L1*y4))*L1)+(Ksr*(x2+(L2*x4))*L2)+(Bsr*(y2+(L2*y4))*L2)+((10*exp(-(5*t)))*L3)))/Ic;
[dydt] = [dydt1; dydt2; dydt3; dydt4];
end
% MfXf"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)-Xf’)-(Kf*Xf);
% MrXr"=Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)-(Kr*Xr) ;
% MbXb"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)]-Xf’)+Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)+fa(t);
% Ic*theta"={-[Ksf(Xf-(L1*theta))*L1]-[Bsf(Xf’-(L1*theta’))*L1]+[Ksr(Xr+(L2*theta))*L2]+[Bsr(Xr’+(L2*theta’))*L2]+[fa(t)*L3]};I get this error when trying to solve these 4 second order differential equations using a program that solves them using Heun’s method and then Gaussian elimination to get a polynomial equation the represents the system. Previsouly posted for help, but the soluitions have symbolics and I need a singular soluition that represents all 4 equations. Does any one have a suggestion on how I can slove this? Is using the "function" with all 4 equations the best way to do this, or is there a nicer method for doing this?
clear,close,clc
%______________________________________________________________SOLUITION_2_Heun’s_Method_(for second order differential equations)_&__Least-Square_Nethod____________________________________________________________%
%4 Equations representing the system working with
% MfXf"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)-Xf’)-(Kf*Xf);
% MrXr"=Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)-(Kr*Xr) ;
% MbXb"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)]-Xf’)+Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)+fa(t);
% Ic*theta"={-[Ksf(Xf-(L1*theta))*L1]-[Bsf(Xf’-(L1*theta’))*L1]+[Ksr(Xr+(L2*theta))*L2]+[Bsr(Xr’+(L2*theta’))*L2]+[fa(t)*L3]};
%————————————————-SYSTEM_PARAMETERS———————————————————————————————————————————————————-
Ic=1356; %kg-m^2
Mb=730; %kg
Mf=59; %kg
Mr=45; %kg
Kf=23000; %N/m
Ksf=18750; %N/m
Kr=16182; %N/m
Ksr=12574; %N/m
Bsf=100; %N*s/m
Bsr=100; %N*s/m
L1=1.45; %m
L2=1.39; %m
L3=0.67; %m
t0=0; %time at the start
tm=20; %what value of (t time) you are ending at
t=t0:tm; % time from time start to time finish seconds
n=4; %order of the polynomial
%Initial Conditions-system at rest therefore x(0)=0 dXf/dt(0)=0 dXr/dt(0)=0 dXb/dt(0)=0 dtheta/dt(0)=0 ;
%time from 0 to 20 h=dx=5;
x0=0; %x at initial condition
y0=0; %y at initial condition
dx=5; %delta(x) or h
h=dx;
%==INPUT SECTION for Euler’s and Heun’s==%
fx=@(x,y,t)y;
fy=@(x,y,t)Projectfunction;
%==CALCULATIONS SECTION==%
tn=t0:h:tm;
xn(1) = x0;
yn(1) = y0;
for i=1:length(tn)
%==EULER’S METHOD
xn(i+1)=xn(i)+fx(xn(i),yn(i),tn(i))*h;
yn(i+1)=yn(i)+fy(xn(i),yn(i),tn(i))*h;
%==NEXT 3 LINES ARE FOR HEUN’S METHOD
tn(i+1)=tn(i)+h;
xn(i+1)=xn(i)+0.5*(fx(xn(i),yn(i),tn(i))+fx(xn(i+1),yn(i+1),tn(i+1)))*h;
yn(i+1)=yn(i)+0.5*(fy(xn(i),yn(i),tn(i))+fy(xn(i+1),yn(i+1),tn(i+1)))*h;
fprintf(‘t=%0.2ft y=%0.3ft z=%0.3fn’,tn(i),xn(i),yn(i))
end
%%%LEAST SQUARE METHOD-FINDS POLYNOMIAL FOR GIVEN DATA SET%%%%%
%INPUT SECTION for Least-Square
X=xn;
Y=yn;
%%__CALCULATIONS SECTION__%%
k=length(X); %NUMBER OF AVAILABLE DATA POINTS
m=n+1; %SIZE OF THE COEFFICENT MATRIX
A=zeros(m,m); %COEFFICENT MATRIX
for j=1:m
for i=1:m
A(j,i)=sum(X.^(i+j-2));
end
end
B=zeros(m,1); %FORCING FUNCTION VECTOR
for i=1:m;
B(i)=sum(Y.*X.^(i-1));
end
a1=AB %COEFFICIENTS FOR THE POLYNOMINAL–> y=a0+a1*x+a2*x^2….an*x^n CAN BE REPLACED BY GAUSSIAN ELIMINATION
%%%%%=========GAUSSIAN ELIMINATION TO FIND "a"========%%%%%%
%%%INPUT SECTION
%CALCULATION SECTION
AB=[A B]; %Augumentent matrix
R=size(AB,1); %# OF ROWS IN AB
C=size(AB,2); %# OF COLUMNS IN AB
%%%%FOWARD ELIMINATION SECTION
for J=1:R-1
[M,I]=max(abs(AB(J:R,J))); %M=MAXIMUM VALUE, I=LOCATION OF THE MAXIMUM VALUE IN THE 1ST ROW
temp=AB(J,:);
AB(J,:)=AB(I+(J-1),:);
AB(I+(J-1),:)=temp;
for i=(J+1):R;
if AB(i,J)~=0;
AB(i,:)=AB(i,:)-(AB(i,J)/AB(J,J))*AB(J,:);
end
end
end
%%%%BACKWARDS SUBSTITUTION
a(R)=AB(R,C)/AB(R,R);
for i=R-1:-1:1
a(i)=(AB(i,C)-AB(i,i+1:R)*a(i+1:R)’)/AB(i,i);
end
disp(a)
syms X
P=0;
for i=1:m;
TT=a(i)*X^(i-1); %T=INDIVIDUAL POLYNOMIAL TERMS
P=P+TT;
end
display(P)
%========END OF GAUSSIAN ELIMINATION=======%%%%%%%%
%STANDARD DEVIATION
Y_bar=mean(Y); %ADVERAGE OF y
St=sum((Y-Y_bar).^2);
SD=sqrt(St/(k-1)); %STANDARD DEVIATION
%STANDARD ERROR
for i=1:m;
T(:,i)=a(i)*X.^(i-1); %T=INDIVIDUAL POLYNOMIAL TERMS
end
for i=1:k
y_hat(i)=sum(T(i,:));
end
Sr=sum((Y-y_hat).^2);
Se=sqrt(Sr/(k-(n+1))); %STANDARD ERROR-Se
%COEFFICIENT OF DETERMINATION
Cd=(St-Sr)/St %COEFFICIENT OF DETERMINATION (r^2)
Cd = 1.0000
fprintf(‘For n=%d. Coefficient of Determination=%0.5fn’,n,Cd)
function [dydt] = Projectfunction(t,x,y)
Ic=1356; %kg-m^2
Mb=730; %kg
Mf=59; %kg
Mr=45; %kg
Kf=23000; %N/m
Ksf=18750; %N/m
Kr=16182; %N/m
Ksr=12574; %N/m
Bsf=100; %N*s/m
Bsr=100; %N*s/m
L1=1.45; %m
L2=1.39; %m
L3=0.67; %m
x1 = x(1); %x1=Xf
x2 = x(2); %x2=Xr
x3 = x(3); %x3=Xb
x4 = x(4); %x4=theta
y1 = y(1); %y1=Xf’=dXf/dt
y2 = y(2); %y2=Xr’=dXr/dt
y3 = y(3); %y3=Xb’=dXb/dt
y4 = y(4); %y4=theta’=dtheta/dt
dydt1 = (Ksf*((x3-(L1*x4)))-x1)+Bsf*((y3-(L1*y4)-y1)-(Kf*x1))/Mf;
dydt2 = (Ksr*((x3+(L2*x4))-x2)+Bsr*((y3+(L2*y4))-y2)-(Kr*x2))/Mr;
dydt3 = (Ksf*((x3-(L1*x4))-x1)+Bsf*((y3-(L1*y4))-y1)+Ksr*((x3+(L2*x4))-x2)+Bsr*((y3+(L2*y4))-y2)-(10*exp(-(5*t))))/Mb;
dydt4 = ((-(Ksf*(x1-(L1*x4))*L1)-(Bsf*(y1-(L1*y4))*L1)+(Ksr*(x2+(L2*x4))*L2)+(Bsr*(y2+(L2*y4))*L2)+((10*exp(-(5*t)))*L3)))/Ic;
[dydt] = [dydt1; dydt2; dydt3; dydt4];
end
% MfXf"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)-Xf’)-(Kf*Xf);
% MrXr"=Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)-(Kr*Xr) ;
% MbXb"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)]-Xf’)+Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)+fa(t);
% Ic*theta"={-[Ksf(Xf-(L1*theta))*L1]-[Bsf(Xf’-(L1*theta’))*L1]+[Ksr(Xr+(L2*theta))*L2]+[Bsr(Xr’+(L2*theta’))*L2]+[fa(t)*L3]}; I get this error when trying to solve these 4 second order differential equations using a program that solves them using Heun’s method and then Gaussian elimination to get a polynomial equation the represents the system. Previsouly posted for help, but the soluitions have symbolics and I need a singular soluition that represents all 4 equations. Does any one have a suggestion on how I can slove this? Is using the "function" with all 4 equations the best way to do this, or is there a nicer method for doing this?
clear,close,clc
%______________________________________________________________SOLUITION_2_Heun’s_Method_(for second order differential equations)_&__Least-Square_Nethod____________________________________________________________%
%4 Equations representing the system working with
% MfXf"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)-Xf’)-(Kf*Xf);
% MrXr"=Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)-(Kr*Xr) ;
% MbXb"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)]-Xf’)+Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)+fa(t);
% Ic*theta"={-[Ksf(Xf-(L1*theta))*L1]-[Bsf(Xf’-(L1*theta’))*L1]+[Ksr(Xr+(L2*theta))*L2]+[Bsr(Xr’+(L2*theta’))*L2]+[fa(t)*L3]};
%————————————————-SYSTEM_PARAMETERS———————————————————————————————————————————————————-
Ic=1356; %kg-m^2
Mb=730; %kg
Mf=59; %kg
Mr=45; %kg
Kf=23000; %N/m
Ksf=18750; %N/m
Kr=16182; %N/m
Ksr=12574; %N/m
Bsf=100; %N*s/m
Bsr=100; %N*s/m
L1=1.45; %m
L2=1.39; %m
L3=0.67; %m
t0=0; %time at the start
tm=20; %what value of (t time) you are ending at
t=t0:tm; % time from time start to time finish seconds
n=4; %order of the polynomial
%Initial Conditions-system at rest therefore x(0)=0 dXf/dt(0)=0 dXr/dt(0)=0 dXb/dt(0)=0 dtheta/dt(0)=0 ;
%time from 0 to 20 h=dx=5;
x0=0; %x at initial condition
y0=0; %y at initial condition
dx=5; %delta(x) or h
h=dx;
%==INPUT SECTION for Euler’s and Heun’s==%
fx=@(x,y,t)y;
fy=@(x,y,t)Projectfunction;
%==CALCULATIONS SECTION==%
tn=t0:h:tm;
xn(1) = x0;
yn(1) = y0;
for i=1:length(tn)
%==EULER’S METHOD
xn(i+1)=xn(i)+fx(xn(i),yn(i),tn(i))*h;
yn(i+1)=yn(i)+fy(xn(i),yn(i),tn(i))*h;
%==NEXT 3 LINES ARE FOR HEUN’S METHOD
tn(i+1)=tn(i)+h;
xn(i+1)=xn(i)+0.5*(fx(xn(i),yn(i),tn(i))+fx(xn(i+1),yn(i+1),tn(i+1)))*h;
yn(i+1)=yn(i)+0.5*(fy(xn(i),yn(i),tn(i))+fy(xn(i+1),yn(i+1),tn(i+1)))*h;
fprintf(‘t=%0.2ft y=%0.3ft z=%0.3fn’,tn(i),xn(i),yn(i))
end
%%%LEAST SQUARE METHOD-FINDS POLYNOMIAL FOR GIVEN DATA SET%%%%%
%INPUT SECTION for Least-Square
X=xn;
Y=yn;
%%__CALCULATIONS SECTION__%%
k=length(X); %NUMBER OF AVAILABLE DATA POINTS
m=n+1; %SIZE OF THE COEFFICENT MATRIX
A=zeros(m,m); %COEFFICENT MATRIX
for j=1:m
for i=1:m
A(j,i)=sum(X.^(i+j-2));
end
end
B=zeros(m,1); %FORCING FUNCTION VECTOR
for i=1:m;
B(i)=sum(Y.*X.^(i-1));
end
a1=AB %COEFFICIENTS FOR THE POLYNOMINAL–> y=a0+a1*x+a2*x^2….an*x^n CAN BE REPLACED BY GAUSSIAN ELIMINATION
%%%%%=========GAUSSIAN ELIMINATION TO FIND "a"========%%%%%%
%%%INPUT SECTION
%CALCULATION SECTION
AB=[A B]; %Augumentent matrix
R=size(AB,1); %# OF ROWS IN AB
C=size(AB,2); %# OF COLUMNS IN AB
%%%%FOWARD ELIMINATION SECTION
for J=1:R-1
[M,I]=max(abs(AB(J:R,J))); %M=MAXIMUM VALUE, I=LOCATION OF THE MAXIMUM VALUE IN THE 1ST ROW
temp=AB(J,:);
AB(J,:)=AB(I+(J-1),:);
AB(I+(J-1),:)=temp;
for i=(J+1):R;
if AB(i,J)~=0;
AB(i,:)=AB(i,:)-(AB(i,J)/AB(J,J))*AB(J,:);
end
end
end
%%%%BACKWARDS SUBSTITUTION
a(R)=AB(R,C)/AB(R,R);
for i=R-1:-1:1
a(i)=(AB(i,C)-AB(i,i+1:R)*a(i+1:R)’)/AB(i,i);
end
disp(a)
syms X
P=0;
for i=1:m;
TT=a(i)*X^(i-1); %T=INDIVIDUAL POLYNOMIAL TERMS
P=P+TT;
end
display(P)
%========END OF GAUSSIAN ELIMINATION=======%%%%%%%%
%STANDARD DEVIATION
Y_bar=mean(Y); %ADVERAGE OF y
St=sum((Y-Y_bar).^2);
SD=sqrt(St/(k-1)); %STANDARD DEVIATION
%STANDARD ERROR
for i=1:m;
T(:,i)=a(i)*X.^(i-1); %T=INDIVIDUAL POLYNOMIAL TERMS
end
for i=1:k
y_hat(i)=sum(T(i,:));
end
Sr=sum((Y-y_hat).^2);
Se=sqrt(Sr/(k-(n+1))); %STANDARD ERROR-Se
%COEFFICIENT OF DETERMINATION
Cd=(St-Sr)/St %COEFFICIENT OF DETERMINATION (r^2)
Cd = 1.0000
fprintf(‘For n=%d. Coefficient of Determination=%0.5fn’,n,Cd)
function [dydt] = Projectfunction(t,x,y)
Ic=1356; %kg-m^2
Mb=730; %kg
Mf=59; %kg
Mr=45; %kg
Kf=23000; %N/m
Ksf=18750; %N/m
Kr=16182; %N/m
Ksr=12574; %N/m
Bsf=100; %N*s/m
Bsr=100; %N*s/m
L1=1.45; %m
L2=1.39; %m
L3=0.67; %m
x1 = x(1); %x1=Xf
x2 = x(2); %x2=Xr
x3 = x(3); %x3=Xb
x4 = x(4); %x4=theta
y1 = y(1); %y1=Xf’=dXf/dt
y2 = y(2); %y2=Xr’=dXr/dt
y3 = y(3); %y3=Xb’=dXb/dt
y4 = y(4); %y4=theta’=dtheta/dt
dydt1 = (Ksf*((x3-(L1*x4)))-x1)+Bsf*((y3-(L1*y4)-y1)-(Kf*x1))/Mf;
dydt2 = (Ksr*((x3+(L2*x4))-x2)+Bsr*((y3+(L2*y4))-y2)-(Kr*x2))/Mr;
dydt3 = (Ksf*((x3-(L1*x4))-x1)+Bsf*((y3-(L1*y4))-y1)+Ksr*((x3+(L2*x4))-x2)+Bsr*((y3+(L2*y4))-y2)-(10*exp(-(5*t))))/Mb;
dydt4 = ((-(Ksf*(x1-(L1*x4))*L1)-(Bsf*(y1-(L1*y4))*L1)+(Ksr*(x2+(L2*x4))*L2)+(Bsr*(y2+(L2*y4))*L2)+((10*exp(-(5*t)))*L3)))/Ic;
[dydt] = [dydt1; dydt2; dydt3; dydt4];
end
% MfXf"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)-Xf’)-(Kf*Xf);
% MrXr"=Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)-(Kr*Xr) ;
% MbXb"=Ksf([Xb-(L1*theta)]-Xf)+Bsf([Xb’-(L1*theta’)]-Xf’)+Ksr([Xb+(L2*theta)]-Xr)+Bsr([Xb’+(L2*theta’)]-Xr’)+fa(t);
% Ic*theta"={-[Ksf(Xf-(L1*theta))*L1]-[Bsf(Xf’-(L1*theta’))*L1]+[Ksr(Xr+(L2*theta))*L2]+[Bsr(Xr’+(L2*theta’))*L2]+[fa(t)*L3]}; polynomial from heun’s method, solving 4 2nd ode MATLAB Answers — New Questions
HOW TO GENERATE XLSX files from .prn files
Post Content Post Content the above pic is in .prn format, i want to convert these .prn file to xlsx file MATLAB Answers — New Questions
SharePoint List Hyperlink Column Formatting
I have created a hyperlink column in a SharePoint list. Each cell when populated, allows for two items. A Link (URL) and Display Text. Every time I try to edit the JSON code for column formatting, the Display Text property for the cell changes to the hyperlink. I am missing something in my JSON Code and can’t find an example or much on the topic. I am simply looking to change the color and size of the display text, while maintaining the underline. Any thoughts?
Thanks,
John
I have created a hyperlink column in a SharePoint list. Each cell when populated, allows for two items. A Link (URL) and Display Text. Every time I try to edit the JSON code for column formatting, the Display Text property for the cell changes to the hyperlink. I am missing something in my JSON Code and can’t find an example or much on the topic. I am simply looking to change the color and size of the display text, while maintaining the underline. Any thoughts? Thanks,John Read More
Data Validation – editing in any of the input boxes – why does it not behave
Can someone help me understand why when I use normal editing gestures in any of the input boxes within the Data Validation popup, that it behaves so badly. For example, I have the following formula: =AND(LEN(A1)=8, ISNUMBER(VALUE(MID(A1,1,7))), RIGHT(A1,1)=”B”). I go to the Formula box and change the B to a Q. The B remains there despite typing over it. However, when I close it and re-open, the Q is there. Or if I try to use an arrow key to move within the text, it starts adding cell references.
I just don’t understand why it behaves so differently from any other input box.
Can someone help me understand why when I use normal editing gestures in any of the input boxes within the Data Validation popup, that it behaves so badly. For example, I have the following formula: =AND(LEN(A1)=8, ISNUMBER(VALUE(MID(A1,1,7))), RIGHT(A1,1)=”B”). I go to the Formula box and change the B to a Q. The B remains there despite typing over it. However, when I close it and re-open, the Q is there. Or if I try to use an arrow key to move within the text, it starts adding cell references. I just don’t understand why it behaves so differently from any other input box. Read More
matrix normalization in matlab
hi.. i want normalize a matrix (129 x 128)..please help me with matlab codeshi.. i want normalize a matrix (129 x 128)..please help me with matlab codes hi.. i want normalize a matrix (129 x 128)..please help me with matlab codes normalization, matrix MATLAB Answers — New Questions
Determining optimal cut off frequency
Hello,
I have some motion capture data that I need to filter before differentiating to get velocity and acceleration. I have been told to filter at a range of frequencies and then calculate the RMSD between the original and filtered data. I want to used a forth order low pass butterworth filter. I have managed to do so but do not understand how I then interpret the plot to decide on my optimal filtering frequency. I have seen some previous posts mention ‘fft’ but do not understand what this does and if I should be using it.
This is my function:
function plot_rmsd_vs_cutoff(data, fs, f_min, f_max, num_points)
% Plot RMSD against cut-off frequency for given data
% Data and sampling frequency
% data: input data
% fs: sampling frequency
% Frequency range
% f_min: minimum cut-off frequency
% f_max: maximum cut-off frequency
% num_points: number of points in the frequency range
% Create a vector of cut-off frequencies
cutoff_freqs = linspace(f_min, f_max, num_points);
% Initialize RMSD vector
rmsd_values = zeros(size(cutoff_freqs));
for i = 1:length(cutoff_freqs)
% Filter data
[b, a] = butter(4, cutoff_freqs(i)/(fs/2), ‘low’); % Example: 4th order lowpass Butterworth
filtered_data = filtfilt(b, a, data);
% Calculate RMSD
rmsd_values(i) = rms(data – filtered_data);
end
% Plot RMSD against cut-off frequency
plot(cutoff_freqs, rmsd_values);
xlabel(‘Cut-off Frequency (Hz)’);
ylabel(‘RMSD’);
title(‘RMSD vs Cut-off Frequency’);
end
This is how I have used it in my code:
% Call the function
plot_rmsd_vs_cutoff(data, fs, 1, 50, 50);
I have attached my data and the output I have got.
Many thanks for any help.Hello,
I have some motion capture data that I need to filter before differentiating to get velocity and acceleration. I have been told to filter at a range of frequencies and then calculate the RMSD between the original and filtered data. I want to used a forth order low pass butterworth filter. I have managed to do so but do not understand how I then interpret the plot to decide on my optimal filtering frequency. I have seen some previous posts mention ‘fft’ but do not understand what this does and if I should be using it.
This is my function:
function plot_rmsd_vs_cutoff(data, fs, f_min, f_max, num_points)
% Plot RMSD against cut-off frequency for given data
% Data and sampling frequency
% data: input data
% fs: sampling frequency
% Frequency range
% f_min: minimum cut-off frequency
% f_max: maximum cut-off frequency
% num_points: number of points in the frequency range
% Create a vector of cut-off frequencies
cutoff_freqs = linspace(f_min, f_max, num_points);
% Initialize RMSD vector
rmsd_values = zeros(size(cutoff_freqs));
for i = 1:length(cutoff_freqs)
% Filter data
[b, a] = butter(4, cutoff_freqs(i)/(fs/2), ‘low’); % Example: 4th order lowpass Butterworth
filtered_data = filtfilt(b, a, data);
% Calculate RMSD
rmsd_values(i) = rms(data – filtered_data);
end
% Plot RMSD against cut-off frequency
plot(cutoff_freqs, rmsd_values);
xlabel(‘Cut-off Frequency (Hz)’);
ylabel(‘RMSD’);
title(‘RMSD vs Cut-off Frequency’);
end
This is how I have used it in my code:
% Call the function
plot_rmsd_vs_cutoff(data, fs, 1, 50, 50);
I have attached my data and the output I have got.
Many thanks for any help. Hello,
I have some motion capture data that I need to filter before differentiating to get velocity and acceleration. I have been told to filter at a range of frequencies and then calculate the RMSD between the original and filtered data. I want to used a forth order low pass butterworth filter. I have managed to do so but do not understand how I then interpret the plot to decide on my optimal filtering frequency. I have seen some previous posts mention ‘fft’ but do not understand what this does and if I should be using it.
This is my function:
function plot_rmsd_vs_cutoff(data, fs, f_min, f_max, num_points)
% Plot RMSD against cut-off frequency for given data
% Data and sampling frequency
% data: input data
% fs: sampling frequency
% Frequency range
% f_min: minimum cut-off frequency
% f_max: maximum cut-off frequency
% num_points: number of points in the frequency range
% Create a vector of cut-off frequencies
cutoff_freqs = linspace(f_min, f_max, num_points);
% Initialize RMSD vector
rmsd_values = zeros(size(cutoff_freqs));
for i = 1:length(cutoff_freqs)
% Filter data
[b, a] = butter(4, cutoff_freqs(i)/(fs/2), ‘low’); % Example: 4th order lowpass Butterworth
filtered_data = filtfilt(b, a, data);
% Calculate RMSD
rmsd_values(i) = rms(data – filtered_data);
end
% Plot RMSD against cut-off frequency
plot(cutoff_freqs, rmsd_values);
xlabel(‘Cut-off Frequency (Hz)’);
ylabel(‘RMSD’);
title(‘RMSD vs Cut-off Frequency’);
end
This is how I have used it in my code:
% Call the function
plot_rmsd_vs_cutoff(data, fs, 1, 50, 50);
I have attached my data and the output I have got.
Many thanks for any help. cut off frequency, butterworth filter, filter, rmsd MATLAB Answers — New Questions
MATLAB crashes on macOS Sonoma when clearing a figure.
I am repeatedly plotting on the same figure object (so that a long-running code doesn’t continuously steal focus for each new figure) and using clf(fig) to clear the figure each time. However, this consistently causes MATLAB to crash on my Mac.
I’ve seen many forum posts on this type of behavior when the figure closes, but nothing on clf specifically. I tried a few solutions:
Adding a line to my startup.m file (https://www.mathworks.com/matlabcentral/answers/2039461-matlab-freezes-i-am-using-mac-apple-m2-max-osx-sonoma, https://www.mathworks.com/matlabcentral/answers/1808195-matlab-r2022a-freezes-on-macos-monterey-12-5-1-when-closing-a-figure#answer_1324680)
Changing clf(fig) to delete(fig) or reset(fig)
Adding pause(0.1) or pause(1) before the clf (this resulted in a crash after ~20 and ~30 figures, respectively, instead of just 1 without it).
I set figure visibility to ‘off’. This tentatively seems to allow me to plot without crashing, but obviously with the limitation of not being able to see the plots as they’re generated! For some plots this is ok for me, for others it is not, such as when I’m plotting movies and want to verify that they’re accurate before wasting time plotting each frame.
I am on an M1 Mac 16GB RAM running MacOS Sonoma 14.5. Is there anything to be done so I can view my figures while plotting them?I am repeatedly plotting on the same figure object (so that a long-running code doesn’t continuously steal focus for each new figure) and using clf(fig) to clear the figure each time. However, this consistently causes MATLAB to crash on my Mac.
I’ve seen many forum posts on this type of behavior when the figure closes, but nothing on clf specifically. I tried a few solutions:
Adding a line to my startup.m file (https://www.mathworks.com/matlabcentral/answers/2039461-matlab-freezes-i-am-using-mac-apple-m2-max-osx-sonoma, https://www.mathworks.com/matlabcentral/answers/1808195-matlab-r2022a-freezes-on-macos-monterey-12-5-1-when-closing-a-figure#answer_1324680)
Changing clf(fig) to delete(fig) or reset(fig)
Adding pause(0.1) or pause(1) before the clf (this resulted in a crash after ~20 and ~30 figures, respectively, instead of just 1 without it).
I set figure visibility to ‘off’. This tentatively seems to allow me to plot without crashing, but obviously with the limitation of not being able to see the plots as they’re generated! For some plots this is ok for me, for others it is not, such as when I’m plotting movies and want to verify that they’re accurate before wasting time plotting each frame.
I am on an M1 Mac 16GB RAM running MacOS Sonoma 14.5. Is there anything to be done so I can view my figures while plotting them? I am repeatedly plotting on the same figure object (so that a long-running code doesn’t continuously steal focus for each new figure) and using clf(fig) to clear the figure each time. However, this consistently causes MATLAB to crash on my Mac.
I’ve seen many forum posts on this type of behavior when the figure closes, but nothing on clf specifically. I tried a few solutions:
Adding a line to my startup.m file (https://www.mathworks.com/matlabcentral/answers/2039461-matlab-freezes-i-am-using-mac-apple-m2-max-osx-sonoma, https://www.mathworks.com/matlabcentral/answers/1808195-matlab-r2022a-freezes-on-macos-monterey-12-5-1-when-closing-a-figure#answer_1324680)
Changing clf(fig) to delete(fig) or reset(fig)
Adding pause(0.1) or pause(1) before the clf (this resulted in a crash after ~20 and ~30 figures, respectively, instead of just 1 without it).
I set figure visibility to ‘off’. This tentatively seems to allow me to plot without crashing, but obviously with the limitation of not being able to see the plots as they’re generated! For some plots this is ok for me, for others it is not, such as when I’m plotting movies and want to verify that they’re accurate before wasting time plotting each frame.
I am on an M1 Mac 16GB RAM running MacOS Sonoma 14.5. Is there anything to be done so I can view my figures while plotting them? mac, sonoma, plot, plotting, figure, crash MATLAB Answers — New Questions
How do I copy figure properties from one to another?
I would like to copy the properties from Fig 1 to Fig 2. How can that be done?I would like to copy the properties from Fig 1 to Fig 2. How can that be done? I would like to copy the properties from Fig 1 to Fig 2. How can that be done? star strider, walter roberson, torsten, dyuman joshi MATLAB Answers — New Questions
Vector field graph from a data file.
I am totally new to Matlab. I have data on file. I need to draw a 2-D vector field graph of the data.
I would appreciate detailed instructions as this is my first attempt as using Matlab.
Much apprrciate any advice.
RegardsI am totally new to Matlab. I have data on file. I need to draw a 2-D vector field graph of the data.
I would appreciate detailed instructions as this is my first attempt as using Matlab.
Much apprrciate any advice.
Regards I am totally new to Matlab. I have data on file. I need to draw a 2-D vector field graph of the data.
I would appreciate detailed instructions as this is my first attempt as using Matlab.
Much apprrciate any advice.
Regards vector field graph MATLAB Answers — New Questions
How to implement MultiStart to find a good fit of two curves at the same time with real data such as our curves are governed by an ODE system?
% Set up the problem for MultiStart
problem = createOptimProblem(‘lsqcurvefit’,’x0′,k0,’objective’,@simulatedhs,…
‘lb’,zeros(size(k0)),’xdata’,tforward ,’ydata’,[Hdata,HSdata] );
ms = MultiStart;
[k,fval,Exitflag,Output,Solutions] = run(ms,problem,50);
simulated_data = simulatedhs(k,tforward);
X=simulated_data(:,1);
Z=simulated_data(:,2);
%plot the result
figure(5)
plot(tforward,Hdata ,tforward,X)
plot(tforward,Hdata,tforward,Y)
legend(‘Data’,’Fitted result’)% Set up the problem for MultiStart
problem = createOptimProblem(‘lsqcurvefit’,’x0′,k0,’objective’,@simulatedhs,…
‘lb’,zeros(size(k0)),’xdata’,tforward ,’ydata’,[Hdata,HSdata] );
ms = MultiStart;
[k,fval,Exitflag,Output,Solutions] = run(ms,problem,50);
simulated_data = simulatedhs(k,tforward);
X=simulated_data(:,1);
Z=simulated_data(:,2);
%plot the result
figure(5)
plot(tforward,Hdata ,tforward,X)
plot(tforward,Hdata,tforward,Y)
legend(‘Data’,’Fitted result’) % Set up the problem for MultiStart
problem = createOptimProblem(‘lsqcurvefit’,’x0′,k0,’objective’,@simulatedhs,…
‘lb’,zeros(size(k0)),’xdata’,tforward ,’ydata’,[Hdata,HSdata] );
ms = MultiStart;
[k,fval,Exitflag,Output,Solutions] = run(ms,problem,50);
simulated_data = simulatedhs(k,tforward);
X=simulated_data(:,1);
Z=simulated_data(:,2);
%plot the result
figure(5)
plot(tforward,Hdata ,tforward,X)
plot(tforward,Hdata,tforward,Y)
legend(‘Data’,’Fitted result’) parameter estimation, curve fitting, multistart, oprimization, global minimum MATLAB Answers — New Questions
Sumproduct with three criteria, one of which is an or statement with two dates
Hi everyone,
This is a complex endeavor for me. I am attempting to use sumproduct with three criteria on another tab.
Criteria 1: If column C indicates “YES”
Criteria 2: If column F indicates “Standalone Service”
Criteria 3: If either columns AA or AB have August in the date
Here’s the formula I’m trying to work with
=SUMPRODUCT((Master_Calendar!$F$3:$F$503=”Standalone Service”)*(Master_Calendar!$C$3:$C503=”YES”)*((MONTH(Master_Calendar!$AA$3:$AA$503)=8)+(MONTH(Master_Calendar!$AB$3:$AB$503)=8)))
I don’t know what I’m doing wrong
Thanks
Hi everyone, This is a complex endeavor for me. I am attempting to use sumproduct with three criteria on another tab.Criteria 1: If column C indicates “YES”Criteria 2: If column F indicates “Standalone Service”Criteria 3: If either columns AA or AB have August in the dateHere’s the formula I’m trying to work with=SUMPRODUCT((Master_Calendar!$F$3:$F$503=”Standalone Service”)*(Master_Calendar!$C$3:$C503=”YES”)*((MONTH(Master_Calendar!$AA$3:$AA$503)=8)+(MONTH(Master_Calendar!$AB$3:$AB$503)=8)))I don’t know what I’m doing wrong Thanks Read More
outlook calendar
Hello everyone,
I have some calendars in Outlook that I no longer need. Is there a way to remove them, please? I want to keep the email inboxes, but I have two unnecessary calendars. I use iCloud for my calendars.
Thank you,
Si
Hello everyone,I have some calendars in Outlook that I no longer need. Is there a way to remove them, please? I want to keep the email inboxes, but I have two unnecessary calendars. I use iCloud for my calendars.Thank you,Si Read More
MDI – licensing for multiple isolated AD forests
Hi,
We have the following setup:
400 humansstandard AD domain in a single forest (sync’ed via AADConnect to the Entra tenant)
500 AD accounts (user accounts + service accounts),
450 synced to Entra ID (some on-prem service accounts are not synced),
400 accounts with M365 E5 licenses (RBAC accounts do not get any licenses),
MDI sensors installed3 separate dev/UAT/prod AD domains (each in a separate forest, no trusts, isolated): 20 accounts, 300 accounts, 500 accounts (prod AD has many accounts for external clients/consultants/etc).
accounts not synchronized to anywhere
we want to start using MS Defender for Identity for these domains to sync to the existing MDI workspace.
1. Are these 400 M365 E5 licenses enough for the whole environment (1+3 AD domains) ?
2. If not, what is the final count of licenses needed?
3. how many licenses need to be bought and of which SKU?
Hi, We have the following setup:400 humansstandard AD domain in a single forest (sync’ed via AADConnect to the Entra tenant)500 AD accounts (user accounts + service accounts),450 synced to Entra ID (some on-prem service accounts are not synced),400 accounts with M365 E5 licenses (RBAC accounts do not get any licenses),MDI sensors installed3 separate dev/UAT/prod AD domains (each in a separate forest, no trusts, isolated): 20 accounts, 300 accounts, 500 accounts (prod AD has many accounts for external clients/consultants/etc).accounts not synchronized to anywherewe want to start using MS Defender for Identity for these domains to sync to the existing MDI workspace.1. Are these 400 M365 E5 licenses enough for the whole environment (1+3 AD domains) ?2. If not, what is the final count of licenses needed?3. how many licenses need to be bought and of which SKU? Read More
IFS displaying spill range and not just one result?
Hi,
I am using the AND function with two criteria inside (e.g if equal to 5 and 10) for a range of cells (vertically, for example A1:A10) but only 1 result appears. How do I spill all results for all 10 cells and not just have the first true result outputted?
For example output should be TRUE, FALSE, FALSE, ETC with TRUE and FALSE being their respective values.
Right now output is only TRUE.
Thanks!
Hi, I am using the AND function with two criteria inside (e.g if equal to 5 and 10) for a range of cells (vertically, for example A1:A10) but only 1 result appears. How do I spill all results for all 10 cells and not just have the first true result outputted? For example output should be TRUE, FALSE, FALSE, ETC with TRUE and FALSE being their respective values. Right now output is only TRUE. Thanks! Read More
Name Reservation on Azure Container Registry
What’s changing?
Starting August 1st, Azure Container Registry (ACR) will update its behavior regarding the deletion and re-creation of registries. ACR will prevent the reuse of a subdomain name, e.g. abc123.azurecr.io, for a period after the resource is deleted. This updated behavior enhances security and prevents subdomain takeovers by automatically reserving registry names during the creation of the ACR resource, without requiring any additional action or configuration from customers.
Once a resource name is reserved, it remains reserved from the moment of creation and throughout an extended period following the deletion of the resource (referred to as a cooldown period). During this cooldown period, subscriptions not associated with the original Azure AD tenant that created the resource will be unable to use the same name for a new registry. After the cooldown period concludes, the name reservation is lifted, allowing any subscription to create a registry with the previously reserved name.
Customer impact
Most customers will not be impacted by this update. If you delete a registry, you can create a new one with the same name within the cooldown period, provided the subscription belongs to the same Azure Active Directory (AAD) tenant. This ensures a seamless experience for customers who routinely create –> delete –> recreate resources with the same name within the same AAD tenant for testing and production workflows.
The name reservation feature guarantees that customers have exclusive rights to a resource name between its deletion and subsequent recreation, preventing other customers from claiming the same name during this interval.
Learn more
To learn more about Azure Container Registry: Azure Container Registry documentation
To learn more about the different ways to avoid dangling domains and subdomains takeover: Prevent dangling DNS entries and avoid subdomain takeover
To learn more about the one-to-many relationship between an Azure AD tenant and an Azure subscription: Azure subscriptions and Azure AD Tenants
Microsoft Tech Community – Latest Blogs –Read More