Category: News
Update schedule for Windows’ OpenSSH
Hello everyone!
I was looking at Windows OpenSSH that can be installed in Settings under System -> Optional Features -> OpenSSH.
The version of SSH that is installed by Windows this way is 8.6p1 (which was released just under 3 years ago). The latest OpenSSH for Windows available on the GitHub repository is 9.5p1.
I was wondering what the update schedule is for OpenSSH for Windows via Windows Update. I have the following questions specifically:
On what schedule does Microsoft update this feature? Is it ever updated?Are security fixes released in the past 3 years included in the OpenSSH that is installed by Windows? Based purely on the version numbers described above, it seems like this OpenSSH distribution has not been updated in the past 3 years: from a security perspective, this seems problematic.
I would be grateful for any information you may have!
Thanks!
Hello everyone!I was looking at Windows OpenSSH that can be installed in Settings under System -> Optional Features -> OpenSSH.The version of SSH that is installed by Windows this way is 8.6p1 (which was released just under 3 years ago). The latest OpenSSH for Windows available on the GitHub repository is 9.5p1.I was wondering what the update schedule is for OpenSSH for Windows via Windows Update. I have the following questions specifically:On what schedule does Microsoft update this feature? Is it ever updated?Are security fixes released in the past 3 years included in the OpenSSH that is installed by Windows? Based purely on the version numbers described above, it seems like this OpenSSH distribution has not been updated in the past 3 years: from a security perspective, this seems problematic.I would be grateful for any information you may have!Thanks! Read More
The Art of SQL Server Tuning
Microsoft Tech Community – Latest Blogs –Read More
can not read input from DC power to MATLAB using F28379D
Hello , I am trying to read accurate DC input by using voltege sensor & current sensor with F28379D, but unfortunately not gave me a correct input
i use matlab 2023a
if any subject wrote on it, or there are video about it or who works on it send to me (sarawi22@gmail.com) or write soluation downHello , I am trying to read accurate DC input by using voltege sensor & current sensor with F28379D, but unfortunately not gave me a correct input
i use matlab 2023a
if any subject wrote on it, or there are video about it or who works on it send to me (sarawi22@gmail.com) or write soluation down Hello , I am trying to read accurate DC input by using voltege sensor & current sensor with F28379D, but unfortunately not gave me a correct input
i use matlab 2023a
if any subject wrote on it, or there are video about it or who works on it send to me (sarawi22@gmail.com) or write soluation down dc input by f28379d MATLAB Answers — New Questions
Barchart colorbar colors from second vector
I have a variant of this question:
https://au.mathworks.com/matlabcentral/answers/506415-bar-chart-legend-and-colour?s_tid=sug_su
I have a bar chart where I am colouring the bars based on a second corresponding vector.
%%
clear
close all
clc
ids1 = [2,4,5,6,8];
meanVals = [0.2,0.204,0.199,0.208,0.19];
velMns = [16.384,16.98,17.182,18.001,18.40];
figure;
b=bar(ids1,meanVals);
xticks(ids1)
grid on
labels = pad(string(b(1).YData),6);
labelsShrt=[extractBetween(labels,1,5)]’;
xtips = b(1).XEndPoints;
ytips = b(1).YEndPoints;
text(xtips,ytips,labelsShrt,’HorizontalAlignment’,’center’,…
‘VerticalAlignment’,’bottom’,’FontSize’,8);
title(‘mean values’)
ylim([min(meanVals)-0.02 max(meanVals)+0.005])
% set bar color
MaxV = 20;
MinV = 5;
range=MaxV-MinV;
colors = jet(range); % Define a colormap
b.FaceColor = ‘flat’;
for II = 1:length(ids1)
barColorID = round(velMns(II),0)-MinV;
b.CData(II,:) = colors(barColorID,:);
end
cbar = colorbar;
caxis([MinV MaxV]);
This works as desired apart from the colormap of the colorbar, which does not correspond to the second vector.
Thanks in advanceI have a variant of this question:
https://au.mathworks.com/matlabcentral/answers/506415-bar-chart-legend-and-colour?s_tid=sug_su
I have a bar chart where I am colouring the bars based on a second corresponding vector.
%%
clear
close all
clc
ids1 = [2,4,5,6,8];
meanVals = [0.2,0.204,0.199,0.208,0.19];
velMns = [16.384,16.98,17.182,18.001,18.40];
figure;
b=bar(ids1,meanVals);
xticks(ids1)
grid on
labels = pad(string(b(1).YData),6);
labelsShrt=[extractBetween(labels,1,5)]’;
xtips = b(1).XEndPoints;
ytips = b(1).YEndPoints;
text(xtips,ytips,labelsShrt,’HorizontalAlignment’,’center’,…
‘VerticalAlignment’,’bottom’,’FontSize’,8);
title(‘mean values’)
ylim([min(meanVals)-0.02 max(meanVals)+0.005])
% set bar color
MaxV = 20;
MinV = 5;
range=MaxV-MinV;
colors = jet(range); % Define a colormap
b.FaceColor = ‘flat’;
for II = 1:length(ids1)
barColorID = round(velMns(II),0)-MinV;
b.CData(II,:) = colors(barColorID,:);
end
cbar = colorbar;
caxis([MinV MaxV]);
This works as desired apart from the colormap of the colorbar, which does not correspond to the second vector.
Thanks in advance I have a variant of this question:
https://au.mathworks.com/matlabcentral/answers/506415-bar-chart-legend-and-colour?s_tid=sug_su
I have a bar chart where I am colouring the bars based on a second corresponding vector.
%%
clear
close all
clc
ids1 = [2,4,5,6,8];
meanVals = [0.2,0.204,0.199,0.208,0.19];
velMns = [16.384,16.98,17.182,18.001,18.40];
figure;
b=bar(ids1,meanVals);
xticks(ids1)
grid on
labels = pad(string(b(1).YData),6);
labelsShrt=[extractBetween(labels,1,5)]’;
xtips = b(1).XEndPoints;
ytips = b(1).YEndPoints;
text(xtips,ytips,labelsShrt,’HorizontalAlignment’,’center’,…
‘VerticalAlignment’,’bottom’,’FontSize’,8);
title(‘mean values’)
ylim([min(meanVals)-0.02 max(meanVals)+0.005])
% set bar color
MaxV = 20;
MinV = 5;
range=MaxV-MinV;
colors = jet(range); % Define a colormap
b.FaceColor = ‘flat’;
for II = 1:length(ids1)
barColorID = round(velMns(II),0)-MinV;
b.CData(II,:) = colors(barColorID,:);
end
cbar = colorbar;
caxis([MinV MaxV]);
This works as desired apart from the colormap of the colorbar, which does not correspond to the second vector.
Thanks in advance bar, colorbar MATLAB Answers — New Questions
sol = bvp4c (OdeBVP, OdeBC, solinit, options);
ne the boundary conditions
function res = OdeBc (ya, yb, A, s, B, lambda)
global A s B lambda
res= [ya(1)-s;
ya(2)-lambda-A*ya(3);
ya(4)-1-B*ya(5);
yb(2);
yb(4)];
end
% setting the initial guess for first solution
function v = OdeInit1(x,A,s,lambda)
global A s lambda
v=[s+0.56
0
0
0
0];
end
% setting the initial guess for second solution
function v1 =OdeInit2(x, A, s)
global A s
v1 = [exp(-x)
exp(-x)
-exp(-x)
-exp(-x)
-exp(-x)];
end
endne the boundary conditions
function res = OdeBc (ya, yb, A, s, B, lambda)
global A s B lambda
res= [ya(1)-s;
ya(2)-lambda-A*ya(3);
ya(4)-1-B*ya(5);
yb(2);
yb(4)];
end
% setting the initial guess for first solution
function v = OdeInit1(x,A,s,lambda)
global A s lambda
v=[s+0.56
0
0
0
0];
end
% setting the initial guess for second solution
function v1 =OdeInit2(x, A, s)
global A s
v1 = [exp(-x)
exp(-x)
-exp(-x)
-exp(-x)
-exp(-x)];
end
end ne the boundary conditions
function res = OdeBc (ya, yb, A, s, B, lambda)
global A s B lambda
res= [ya(1)-s;
ya(2)-lambda-A*ya(3);
ya(4)-1-B*ya(5);
yb(2);
yb(4)];
end
% setting the initial guess for first solution
function v = OdeInit1(x,A,s,lambda)
global A s lambda
v=[s+0.56
0
0
0
0];
end
% setting the initial guess for second solution
function v1 =OdeInit2(x, A, s)
global A s
v1 = [exp(-x)
exp(-x)
-exp(-x)
-exp(-x)
-exp(-x)];
end
end not enough input arguments. MATLAB Answers — New Questions
CAD design in Google Earth
Can we use a CAD design in Siemens Nx as a kml file on Google earth and make animation?Can we use a CAD design in Siemens Nx as a kml file on Google earth and make animation? Can we use a CAD design in Siemens Nx as a kml file on Google earth and make animation? siemens, solidworks, matlab, matlab code, google, simulation, simulink, animation, kml, kmz, toolbox MATLAB Answers — New Questions
Optimizing Business Impact through Marketplace: join us on May 28th!
Are you interested in learning about the direction of Microsoft Copilot in the Microsoft Commercial Marketplace and how to deepen success across offer type and channel?
Join GM, Marketplace FastTrack Paul Maher, Director, Marketplace FastTrack Patrick Butler Monterde, and a team of experts on May 28, 9 – 10 am PDT to gain insights and share your experiences in this live, interactive session!
Are you interested in learning about the direction of Microsoft Copilot in the Microsoft Commercial Marketplace and how to deepen success across offer type and channel?Join GM, Marketplace FastTrack Paul Maher, Director, Marketplace FastTrack Patrick Butler Monterde, and a team of experts on May 28, 9 – 10 am PDT to gain insights and share your experiences in this live, interactive session! Read More
Filter a list based on another list
I have a list of SKUs as text strings in one worksheet. I have another worksheet with rows of transactions that use Item Names that contain the SKU strings plus other text. I want to filter the rows of transactions against the list SKUs in the one worksheet.
Example: SKU “BG HG:TL123” Transaction row Item Name “BG HG:TL123 Fuzzy Dice”
I want to filter and find all transactions that have Item Names that contain a SKU from the list in the one worksheet.
Thanks ahead for the help.
Brad
I have a list of SKUs as text strings in one worksheet. I have another worksheet with rows of transactions that use Item Names that contain the SKU strings plus other text. I want to filter the rows of transactions against the list SKUs in the one worksheet.Example: SKU “BG HG:TL123” Transaction row Item Name “BG HG:TL123 Fuzzy Dice”I want to filter and find all transactions that have Item Names that contain a SKU from the list in the one worksheet.Thanks ahead for the help.Brad Read More
Cannot connect local Azure Data Studio to Azure SQL Server Database
I am getting an error like this:
The server you specified tcp:xxxx,1433 does not exist in any subscription in xxxx. Either you have signed in with an incorrect account or your server was removed from subscription(s) in this account. Please check your account and try again.
I signed on to Azure and created a SQL Server. I was offered an “Azure signup subscription,” which I accepted. I created a database on the server, and I can see both the server and the database in my Azure dashboard. Now, I want to connect to the database using Azure Data Studio. I am using the connect string to connect.
Server=tcp:<sql server name>.database.windows.net,1433;Initial Catalog=<database name>;Persist Security Info=False;User ID=<user id>;Password=<pw.>;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
When I click Connect, I am taken to a “Create new firewall rule”. I enter the Azure email account info that I use to signin to Azure. A Firewall rule is created and it ads a client IP which I am not familar with (97.126…).
I click OK for the firewall, and I get this error:
The server you specified tcp:mysqlserver12358.database.windows.net,1433 does not exist in any subscription in 00000000-0000-0000-… (a very long subscription ID that I don’t recognize). Either you have signed in with an incorrect account or your server was removed from subscription(s) in this account. Please check your account and try again.
In setting up Network security on Azure for the SQL server, I have checked “Allow Azure Services and resources to access this server”.
The Azure Data Studio I’m working from is on a home WIFI network.
What do I need to do to connect to Azure SQL Server from my home network?
I am getting an error like this:The server you specified tcp:xxxx,1433 does not exist in any subscription in xxxx. Either you have signed in with an incorrect account or your server was removed from subscription(s) in this account. Please check your account and try again.I signed on to Azure and created a SQL Server. I was offered an “Azure signup subscription,” which I accepted. I created a database on the server, and I can see both the server and the database in my Azure dashboard. Now, I want to connect to the database using Azure Data Studio. I am using the connect string to connect.Server=tcp:<sql server name>.database.windows.net,1433;Initial Catalog=<database name>;Persist Security Info=False;User ID=<user id>;Password=<pw.>;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30; When I click Connect, I am taken to a “Create new firewall rule”. I enter the Azure email account info that I use to signin to Azure. A Firewall rule is created and it ads a client IP which I am not familar with (97.126…). I click OK for the firewall, and I get this error:The server you specified tcp:mysqlserver12358.database.windows.net,1433 does not exist in any subscription in 00000000-0000-0000-… (a very long subscription ID that I don’t recognize). Either you have signed in with an incorrect account or your server was removed from subscription(s) in this account. Please check your account and try again. In setting up Network security on Azure for the SQL server, I have checked “Allow Azure Services and resources to access this server”. The Azure Data Studio I’m working from is on a home WIFI network.What do I need to do to connect to Azure SQL Server from my home network? Read More
Guest user is unable to access files in Teams
Hello
Please i need your help on this issue.
A guest user is experiencing difficulty accessing files in Teams.
How do i go about this to get this issue resolve.
Hello Please i need your help on this issue. A guest user is experiencing difficulty accessing files in Teams. How do i go about this to get this issue resolve. Read More
Why does imhist() do this?
I thought I had asked this once before, but maybe it was a fever dream. It’s hard to tell at this point.
IPT imhist() is a convenience tool for creating histograms of grayscale image data. It bins the image data such that the end bins are centered on the ends of the interval implied by the numeric class of the data (e.g. [0 1] for ‘double’). It displays the histogram using a stem() plot, with one stem in the center of each histogram bin.
This much might be disagreeable, since the end bins are effectively half-width, but let’s accept the choice to align the bin centers to the interval limits instead of aligning the bin edges.
What I can’t understand is the colorbar. Beneath the stem plot is a grayscale colorbar showing the progression N gray levels corresponding to the N histogram bins. The problem is twofold:
While the histogram bin centers are aligned to the interval limits (and cannot be changed), the gray segments of the colorbar have their edges aligned with the interval limits — and they can’t be changed either. The two are always misaligned.
The actual gray values used in the colorbar correspond to the upper edge of where the histogram bins would be if they were edge-aligned, but they’re not. The first half of the gray segments don’t even correspond to the bin they represent. The asymmetry makes plots with small N extra nonsensical.
So I put together a thing for visual emphasis and figured I’d run it here to see if it’s just my old version. It’s not.
% some inputs
inpict = rand(500);
n = 5;
% imhist can either give outputs or plot.
% it can’t do both, so we have to call it twice.
imhist(inpict,n); hold on
[counts centers] = imhist(inpict,n);
% find the axes since it won’t give them to us
hax = findobj(get(gcf,’children’),’type’,’axes’);
% figure out the bin edges from the centers,
% since it won’t give us edges either
dx = diff(centers(1:2));
xr = [centers(1)-dx/2 centers(end)+dx/2];
yr = ylim(hax(2));
% create two images:
% top is a smooth sweep from black to white.
% bottom corresponds to the center of each histogram bin.
% the two images should periodically match at each bin center.
smoothramp = repmat(linspace(xr(1),xr(2),100),[1 1 3]);
binramp = repmat(centers.’,[1 1 3]);
binramp = imresize(binramp,[1 size(smoothramp,2)],’nearest’);
% put an image behind the stem plot
hi = image(xr,yr,[binramp; smoothramp],’parent’,hax(2));
uistack(hi,’bottom’)
% find the stem plot and make it fat so it’s easier to see
hst = findobj(hax(2),’type’,’stem’);
set(hst,’linewidth’,3)
% draw a solid gray circle above each stem,
% such that the circle color is taken directly from the stem position
for k = 1:n
hp = plot(hax(2),centers(k),yr(2)*0.67,’.’);
hp.Color = [1 1 1]*centers(k);
hp.MarkerSize = 60;
end
So we have a stem plot, two images, and circular plot markers that all agree, but the color bar is off doing its own thing. The gray level in the first two colorbar segments isn’t even in the corresponding histogram bin.
Apparently this is the way imhist() has done it for at least the last 15 years, so is there actually a reason for it, or is it just one of those forever-bugs?
I’m in the middle of trying to write my way around MIMT’s usage of imhist(), and I’m inclined to just take a step back and make a complete replacement instead.I thought I had asked this once before, but maybe it was a fever dream. It’s hard to tell at this point.
IPT imhist() is a convenience tool for creating histograms of grayscale image data. It bins the image data such that the end bins are centered on the ends of the interval implied by the numeric class of the data (e.g. [0 1] for ‘double’). It displays the histogram using a stem() plot, with one stem in the center of each histogram bin.
This much might be disagreeable, since the end bins are effectively half-width, but let’s accept the choice to align the bin centers to the interval limits instead of aligning the bin edges.
What I can’t understand is the colorbar. Beneath the stem plot is a grayscale colorbar showing the progression N gray levels corresponding to the N histogram bins. The problem is twofold:
While the histogram bin centers are aligned to the interval limits (and cannot be changed), the gray segments of the colorbar have their edges aligned with the interval limits — and they can’t be changed either. The two are always misaligned.
The actual gray values used in the colorbar correspond to the upper edge of where the histogram bins would be if they were edge-aligned, but they’re not. The first half of the gray segments don’t even correspond to the bin they represent. The asymmetry makes plots with small N extra nonsensical.
So I put together a thing for visual emphasis and figured I’d run it here to see if it’s just my old version. It’s not.
% some inputs
inpict = rand(500);
n = 5;
% imhist can either give outputs or plot.
% it can’t do both, so we have to call it twice.
imhist(inpict,n); hold on
[counts centers] = imhist(inpict,n);
% find the axes since it won’t give them to us
hax = findobj(get(gcf,’children’),’type’,’axes’);
% figure out the bin edges from the centers,
% since it won’t give us edges either
dx = diff(centers(1:2));
xr = [centers(1)-dx/2 centers(end)+dx/2];
yr = ylim(hax(2));
% create two images:
% top is a smooth sweep from black to white.
% bottom corresponds to the center of each histogram bin.
% the two images should periodically match at each bin center.
smoothramp = repmat(linspace(xr(1),xr(2),100),[1 1 3]);
binramp = repmat(centers.’,[1 1 3]);
binramp = imresize(binramp,[1 size(smoothramp,2)],’nearest’);
% put an image behind the stem plot
hi = image(xr,yr,[binramp; smoothramp],’parent’,hax(2));
uistack(hi,’bottom’)
% find the stem plot and make it fat so it’s easier to see
hst = findobj(hax(2),’type’,’stem’);
set(hst,’linewidth’,3)
% draw a solid gray circle above each stem,
% such that the circle color is taken directly from the stem position
for k = 1:n
hp = plot(hax(2),centers(k),yr(2)*0.67,’.’);
hp.Color = [1 1 1]*centers(k);
hp.MarkerSize = 60;
end
So we have a stem plot, two images, and circular plot markers that all agree, but the color bar is off doing its own thing. The gray level in the first two colorbar segments isn’t even in the corresponding histogram bin.
Apparently this is the way imhist() has done it for at least the last 15 years, so is there actually a reason for it, or is it just one of those forever-bugs?
I’m in the middle of trying to write my way around MIMT’s usage of imhist(), and I’m inclined to just take a step back and make a complete replacement instead. I thought I had asked this once before, but maybe it was a fever dream. It’s hard to tell at this point.
IPT imhist() is a convenience tool for creating histograms of grayscale image data. It bins the image data such that the end bins are centered on the ends of the interval implied by the numeric class of the data (e.g. [0 1] for ‘double’). It displays the histogram using a stem() plot, with one stem in the center of each histogram bin.
This much might be disagreeable, since the end bins are effectively half-width, but let’s accept the choice to align the bin centers to the interval limits instead of aligning the bin edges.
What I can’t understand is the colorbar. Beneath the stem plot is a grayscale colorbar showing the progression N gray levels corresponding to the N histogram bins. The problem is twofold:
While the histogram bin centers are aligned to the interval limits (and cannot be changed), the gray segments of the colorbar have their edges aligned with the interval limits — and they can’t be changed either. The two are always misaligned.
The actual gray values used in the colorbar correspond to the upper edge of where the histogram bins would be if they were edge-aligned, but they’re not. The first half of the gray segments don’t even correspond to the bin they represent. The asymmetry makes plots with small N extra nonsensical.
So I put together a thing for visual emphasis and figured I’d run it here to see if it’s just my old version. It’s not.
% some inputs
inpict = rand(500);
n = 5;
% imhist can either give outputs or plot.
% it can’t do both, so we have to call it twice.
imhist(inpict,n); hold on
[counts centers] = imhist(inpict,n);
% find the axes since it won’t give them to us
hax = findobj(get(gcf,’children’),’type’,’axes’);
% figure out the bin edges from the centers,
% since it won’t give us edges either
dx = diff(centers(1:2));
xr = [centers(1)-dx/2 centers(end)+dx/2];
yr = ylim(hax(2));
% create two images:
% top is a smooth sweep from black to white.
% bottom corresponds to the center of each histogram bin.
% the two images should periodically match at each bin center.
smoothramp = repmat(linspace(xr(1),xr(2),100),[1 1 3]);
binramp = repmat(centers.’,[1 1 3]);
binramp = imresize(binramp,[1 size(smoothramp,2)],’nearest’);
% put an image behind the stem plot
hi = image(xr,yr,[binramp; smoothramp],’parent’,hax(2));
uistack(hi,’bottom’)
% find the stem plot and make it fat so it’s easier to see
hst = findobj(hax(2),’type’,’stem’);
set(hst,’linewidth’,3)
% draw a solid gray circle above each stem,
% such that the circle color is taken directly from the stem position
for k = 1:n
hp = plot(hax(2),centers(k),yr(2)*0.67,’.’);
hp.Color = [1 1 1]*centers(k);
hp.MarkerSize = 60;
end
So we have a stem plot, two images, and circular plot markers that all agree, but the color bar is off doing its own thing. The gray level in the first two colorbar segments isn’t even in the corresponding histogram bin.
Apparently this is the way imhist() has done it for at least the last 15 years, so is there actually a reason for it, or is it just one of those forever-bugs?
I’m in the middle of trying to write my way around MIMT’s usage of imhist(), and I’m inclined to just take a step back and make a complete replacement instead. imhist, histogram MATLAB Answers — New Questions
How to convert a long data file csv into a wide data file csv
Hello everyone,
I’ve this big problem with this data file csv that I would like to convert into a wide one. The aim is to obtain instead of a column in which the numerical values of Activation appear, two columns respectively Activation_1 and Activation_2. These must correspond to the relative values of the Condition, the first Cond1_N and the second Cond2_U.
Below I have attached a photo of what the original long format looks like. If anyone could help me I would be happy! Thank youHello everyone,
I’ve this big problem with this data file csv that I would like to convert into a wide one. The aim is to obtain instead of a column in which the numerical values of Activation appear, two columns respectively Activation_1 and Activation_2. These must correspond to the relative values of the Condition, the first Cond1_N and the second Cond2_U.
Below I have attached a photo of what the original long format looks like. If anyone could help me I would be happy! Thank you Hello everyone,
I’ve this big problem with this data file csv that I would like to convert into a wide one. The aim is to obtain instead of a column in which the numerical values of Activation appear, two columns respectively Activation_1 and Activation_2. These must correspond to the relative values of the Condition, the first Cond1_N and the second Cond2_U.
Below I have attached a photo of what the original long format looks like. If anyone could help me I would be happy! Thank you longtowidefile MATLAB Answers — New Questions
Need help for Influence line plotting
I am a civil engineering student specializing in Structural Design. I’m working on a project for a "Prestressed Concrete" course, where I am designing a section for a bridge with prestressed reinforcement. As part of the project, I need to first construct envelopes for the shear force and bending moment for the bridge under a loading pattern where a four-axle truck (in addition to the dead load) traverses the bridge, with different weights for the front and rear axles, thus resulting in different forces. The truck can approach the bridge from either side.
I’ve attached an image to clarify the loading pattern; ‘X’ in the image marks the truck’s position relative to the bridge’s edge.
I have developed MATLAB code that plots the shear and moment envelopes based on the influence line method. The problem is that I am getting non-symmetric graphs, which suggests there is an issue with the code.
In the attached image of the code output for the shear envelope, it can be seen that at a distance of 3 meters relative to the beam center (18 meters), the values obtained are not identical, making the graph asymmetric. I would appreciate any help to correct the code. I am open to different methods that could help solve the issue.
Thank you!!I am a civil engineering student specializing in Structural Design. I’m working on a project for a "Prestressed Concrete" course, where I am designing a section for a bridge with prestressed reinforcement. As part of the project, I need to first construct envelopes for the shear force and bending moment for the bridge under a loading pattern where a four-axle truck (in addition to the dead load) traverses the bridge, with different weights for the front and rear axles, thus resulting in different forces. The truck can approach the bridge from either side.
I’ve attached an image to clarify the loading pattern; ‘X’ in the image marks the truck’s position relative to the bridge’s edge.
I have developed MATLAB code that plots the shear and moment envelopes based on the influence line method. The problem is that I am getting non-symmetric graphs, which suggests there is an issue with the code.
In the attached image of the code output for the shear envelope, it can be seen that at a distance of 3 meters relative to the beam center (18 meters), the values obtained are not identical, making the graph asymmetric. I would appreciate any help to correct the code. I am open to different methods that could help solve the issue.
Thank you!! I am a civil engineering student specializing in Structural Design. I’m working on a project for a "Prestressed Concrete" course, where I am designing a section for a bridge with prestressed reinforcement. As part of the project, I need to first construct envelopes for the shear force and bending moment for the bridge under a loading pattern where a four-axle truck (in addition to the dead load) traverses the bridge, with different weights for the front and rear axles, thus resulting in different forces. The truck can approach the bridge from either side.
I’ve attached an image to clarify the loading pattern; ‘X’ in the image marks the truck’s position relative to the bridge’s edge.
I have developed MATLAB code that plots the shear and moment envelopes based on the influence line method. The problem is that I am getting non-symmetric graphs, which suggests there is an issue with the code.
In the attached image of the code output for the shear envelope, it can be seen that at a distance of 3 meters relative to the beam center (18 meters), the values obtained are not identical, making the graph asymmetric. I would appreciate any help to correct the code. I am open to different methods that could help solve the issue.
Thank you!! matlab function, function, civil engineering MATLAB Answers — New Questions
Improve fit quality for a custom function with near-perfect starting values
I’m trying to fit data with a relatively complicated custom function (combined logistic+linear function; combined effect of my data+noise). By trail-and-error I can manually find a good fit (indicated below), but I want MATLAB to do the final fine-tuning. Instead, the MATLAB fit is way worse than what I can do manually. As this takes minutes to do by hand and I will need to process hundreds of images, I really want to automate this.
This is the starting fit I provide manually:
<</matlabcentral/answers/uploaded_files/120202/fitInit.png>>
This is the fit after MATLAB is done (using the manual fit values as startpoint):
<</matlabcentral/answers/uploaded_files/120203/fitDone.png>>
I tried:
* Setting lower and upper bounds
* Parameter scaling (all coefficients between 1E-2 and 1E2)
* Changing algorithm
* Setting DiffMinChange and DiffMaxChange to small values
* Changing TolX and TolFun
*The main thing I don’t understand is why MATLAB worsens the fit.* Especially with low DiffMinChange and DiffMaxChange, I would expect MATLAB to give the starting fit or something better.
In case people want to try for themselves, below I provide the data and custom function.
The data-to-fit is in ‘data.txt’, while the function I use to fit it is:
I=@(Ac,b,AE,bg,bgx,x) AE.*(1./(1+1E15./Ac.*exp(-b.*x)))+bg+bgx.*x;.
The manual startpoint is
start=[1.75 0.065 14 16 0.015];
To help with interpretation of the function:
* It is a logistic function ‘1/(1+1E15./Ac*exp(-b*x))’,
* a scale-factor for the logistic function ‘AE’, (the 1E15 is to scale the parameter)
* a background offset ‘bg’, and
* a background slope ‘bgx’.I’m trying to fit data with a relatively complicated custom function (combined logistic+linear function; combined effect of my data+noise). By trail-and-error I can manually find a good fit (indicated below), but I want MATLAB to do the final fine-tuning. Instead, the MATLAB fit is way worse than what I can do manually. As this takes minutes to do by hand and I will need to process hundreds of images, I really want to automate this.
This is the starting fit I provide manually:
<</matlabcentral/answers/uploaded_files/120202/fitInit.png>>
This is the fit after MATLAB is done (using the manual fit values as startpoint):
<</matlabcentral/answers/uploaded_files/120203/fitDone.png>>
I tried:
* Setting lower and upper bounds
* Parameter scaling (all coefficients between 1E-2 and 1E2)
* Changing algorithm
* Setting DiffMinChange and DiffMaxChange to small values
* Changing TolX and TolFun
*The main thing I don’t understand is why MATLAB worsens the fit.* Especially with low DiffMinChange and DiffMaxChange, I would expect MATLAB to give the starting fit or something better.
In case people want to try for themselves, below I provide the data and custom function.
The data-to-fit is in ‘data.txt’, while the function I use to fit it is:
I=@(Ac,b,AE,bg,bgx,x) AE.*(1./(1+1E15./Ac.*exp(-b.*x)))+bg+bgx.*x;.
The manual startpoint is
start=[1.75 0.065 14 16 0.015];
To help with interpretation of the function:
* It is a logistic function ‘1/(1+1E15./Ac*exp(-b*x))’,
* a scale-factor for the logistic function ‘AE’, (the 1E15 is to scale the parameter)
* a background offset ‘bg’, and
* a background slope ‘bgx’. I’m trying to fit data with a relatively complicated custom function (combined logistic+linear function; combined effect of my data+noise). By trail-and-error I can manually find a good fit (indicated below), but I want MATLAB to do the final fine-tuning. Instead, the MATLAB fit is way worse than what I can do manually. As this takes minutes to do by hand and I will need to process hundreds of images, I really want to automate this.
This is the starting fit I provide manually:
<</matlabcentral/answers/uploaded_files/120202/fitInit.png>>
This is the fit after MATLAB is done (using the manual fit values as startpoint):
<</matlabcentral/answers/uploaded_files/120203/fitDone.png>>
I tried:
* Setting lower and upper bounds
* Parameter scaling (all coefficients between 1E-2 and 1E2)
* Changing algorithm
* Setting DiffMinChange and DiffMaxChange to small values
* Changing TolX and TolFun
*The main thing I don’t understand is why MATLAB worsens the fit.* Especially with low DiffMinChange and DiffMaxChange, I would expect MATLAB to give the starting fit or something better.
In case people want to try for themselves, below I provide the data and custom function.
The data-to-fit is in ‘data.txt’, while the function I use to fit it is:
I=@(Ac,b,AE,bg,bgx,x) AE.*(1./(1+1E15./Ac.*exp(-b.*x)))+bg+bgx.*x;.
The manual startpoint is
start=[1.75 0.065 14 16 0.015];
To help with interpretation of the function:
* It is a logistic function ‘1/(1+1E15./Ac*exp(-b*x))’,
* a scale-factor for the logistic function ‘AE’, (the 1E15 is to scale the parameter)
* a background offset ‘bg’, and
* a background slope ‘bgx’. curve fitting MATLAB Answers — New Questions
‘sparameters’ function showing error to read S-parameter data from touchstone file
I am trying to read S-parameter data from touchstone file using the following option:
sobj = sparameters(filename)
But getting the following errors
"Error using rf.file.touchstone.Data/read
Data is inconsistent with the Touchstone format.
Error in rf.file.touchstone.Data
Error in rf.internal.netparams.AllParameters/readRFFile
Error in rf.internal.netparams.AllParameters
Error in rf.internal.netparams.ScatteringParameters
Error in sparameters (line 80)
obj = obj@rf.internal.netparams.ScatteringParameters(varargin{:});"
The touchstone file is in DB/angle format
! …
# GHz S DB R 50
!
Is that an issue or the problem is somewhre else?
Note that I can read the touchstone file without any issue in other commercial software.I am trying to read S-parameter data from touchstone file using the following option:
sobj = sparameters(filename)
But getting the following errors
"Error using rf.file.touchstone.Data/read
Data is inconsistent with the Touchstone format.
Error in rf.file.touchstone.Data
Error in rf.internal.netparams.AllParameters/readRFFile
Error in rf.internal.netparams.AllParameters
Error in rf.internal.netparams.ScatteringParameters
Error in sparameters (line 80)
obj = obj@rf.internal.netparams.ScatteringParameters(varargin{:});"
The touchstone file is in DB/angle format
! …
# GHz S DB R 50
!
Is that an issue or the problem is somewhre else?
Note that I can read the touchstone file without any issue in other commercial software. I am trying to read S-parameter data from touchstone file using the following option:
sobj = sparameters(filename)
But getting the following errors
"Error using rf.file.touchstone.Data/read
Data is inconsistent with the Touchstone format.
Error in rf.file.touchstone.Data
Error in rf.internal.netparams.AllParameters/readRFFile
Error in rf.internal.netparams.AllParameters
Error in rf.internal.netparams.ScatteringParameters
Error in sparameters (line 80)
obj = obj@rf.internal.netparams.ScatteringParameters(varargin{:});"
The touchstone file is in DB/angle format
! …
# GHz S DB R 50
!
Is that an issue or the problem is somewhre else?
Note that I can read the touchstone file without any issue in other commercial software. sparameters, touchstone MATLAB Answers — New Questions
Formula delay
Whenever I inputted a formula in a cell, the formula showed up with some delay. However, when I inputted number into the cell, it showed up with no delay. May I know how to fix it?
Whenever I inputted a formula in a cell, the formula showed up with some delay. However, when I inputted number into the cell, it showed up with no delay. May I know how to fix it? Read More
Converting Google docs to Microsoft Word, possible formatting changes?
If I download a Google doc (which is saved as a .docx) as a Microsoft Word document, am I guaranteed to have no formatting changes or other changes?
I’m the editor, and the layout artist needs Word docs, but the developer gives me Google docs. I’m afraid if I edit the Google docs, some changes could occur when the layout artist downloads the Google docs as Word docs for use in InDesign. Should I be afraid of this?
If I download a Google doc (which is saved as a .docx) as a Microsoft Word document, am I guaranteed to have no formatting changes or other changes? I’m the editor, and the layout artist needs Word docs, but the developer gives me Google docs. I’m afraid if I edit the Google docs, some changes could occur when the layout artist downloads the Google docs as Word docs for use in InDesign. Should I be afraid of this? Read More
Elon Musk Esaver Watt Reviews-{UPDATED CUSTOMER REVIEWS}-Read All Information about of Esaver Watt C
The environmental benefits of using the eSaver Watt are equally impressive as its cost-saving perks. By decreasing overall energy consumption, this device indirectly contributes to a sizable reduction in carbon footprint. Power plants, which are predominantly fueled by fossil fuels, produce less carbon dioxide and other harmful emissions when demand for energy drops. Through the widespread use of devices like eSaver Watt, we can play a critical role in mitigating climate change and promoting a healthier planet.
Today’s Special Offer – Esaver Watt Official Website – Get 70% Off And Free Shipping!
The environmental benefits of using the eSaver Watt are equally impressive as its cost-saving perks. By decreasing overall energy consumption, this device indirectly contributes to a sizable reduction in carbon footprint. Power plants, which are predominantly fueled by fossil fuels, produce less carbon dioxide and other harmful emissions when demand for energy drops. Through the widespread use of devices like eSaver Watt, we can play a critical role in mitigating climate change and promoting a healthier planet. Today’s Special Offer – Esaver Watt Official Website – Get 70% Off And Free Shipping! Read More
Can we sense the vibration & tilt of vehicle in driving scenario design app.
Post Content Post Content automotive, driving design scenerio, matlab, simulink MATLAB Answers — New Questions
Excel fails to open an new worksheet automatically when I open it
Hi, after I deleted the setting of my Excel, it fails to open an new worksheet automatically when I open it. May I know how to fix it?
Hi, after I deleted the setting of my Excel, it fails to open an new worksheet automatically when I open it. May I know how to fix it? Read More