Month: August 2024
Annual to Triennial – new end date?
I have searched quite a bit – surprise suprise, didn‘t find any answer…
Since there is an upcoming price increase, many customers are thinking about locking their prices now for 36 months (in our case, D365 F/SCM).
Can somebody tell me, what happens to an existing annual subscription if we change them to triennial?
Current one: Jan 1 2024 – Dec 31 2024 – I change it on August 25 to triennial.
new end date August 24 2027?
Thanks for your help (there is nothing in the NCE handbook nor on the learn microsoft page about „Manage term duration and billing frequency“)
cheers
I have searched quite a bit – surprise suprise, didn‘t find any answer…Since there is an upcoming price increase, many customers are thinking about locking their prices now for 36 months (in our case, D365 F/SCM). Can somebody tell me, what happens to an existing annual subscription if we change them to triennial?Current one: Jan 1 2024 – Dec 31 2024 – I change it on August 25 to triennial.new end date August 24 2027?Thanks for your help (there is nothing in the NCE handbook nor on the learn microsoft page about „Manage term duration and billing frequency“)cheers Read More
Your variables are reaching 2GB limit,revert to save -v7.3 This will be slower but avoids matlab not saving the data.
When I was processing data with MATLAB on Ubuntu 20, I received the following message:
Your variables are reaching 2GB limit, revert to save -v7.3
This will be slower but avoids matlab not saving the data
I then changed the MAT file save format to 7.3 in the MATLAB preferences, but after restarting the software and the computer, I still encountered the same error when processing data. How should I resolve this?When I was processing data with MATLAB on Ubuntu 20, I received the following message:
Your variables are reaching 2GB limit, revert to save -v7.3
This will be slower but avoids matlab not saving the data
I then changed the MAT file save format to 7.3 in the MATLAB preferences, but after restarting the software and the computer, I still encountered the same error when processing data. How should I resolve this? When I was processing data with MATLAB on Ubuntu 20, I received the following message:
Your variables are reaching 2GB limit, revert to save -v7.3
This will be slower but avoids matlab not saving the data
I then changed the MAT file save format to 7.3 in the MATLAB preferences, but after restarting the software and the computer, I still encountered the same error when processing data. How should I resolve this? variables limit, ubuntu MATLAB Answers — New Questions
Changing colors of outlier markers, median and whiskers in a box and whisker plot
Hello,
So, currently I have the following script to generate a box and whisker plot:
x1 = randn(128, 1);
x2 = randn(100, 1);
X = [x1; x2];
colors = [0 0.4470 0.7410; 0.8500 0.3250 0.0980];
grp = [ones(size(x1)); 2.*ones(size(x2))];
h = boxplot(X, grp, …
‘Colors’,colors, …
‘Symbol’,’.’)
for j=1:size(h,2)
patch(get(h(5,j),’XData’),get(h(5,j),’YData’),get(h(5,j),’Color’),’FaceAlpha’,.7);
end
The result I get is this one:
What I would like to do is to make the whisker line, the median line and the outline markers all black. The end result would be something like this:
Thanks!Hello,
So, currently I have the following script to generate a box and whisker plot:
x1 = randn(128, 1);
x2 = randn(100, 1);
X = [x1; x2];
colors = [0 0.4470 0.7410; 0.8500 0.3250 0.0980];
grp = [ones(size(x1)); 2.*ones(size(x2))];
h = boxplot(X, grp, …
‘Colors’,colors, …
‘Symbol’,’.’)
for j=1:size(h,2)
patch(get(h(5,j),’XData’),get(h(5,j),’YData’),get(h(5,j),’Color’),’FaceAlpha’,.7);
end
The result I get is this one:
What I would like to do is to make the whisker line, the median line and the outline markers all black. The end result would be something like this:
Thanks! Hello,
So, currently I have the following script to generate a box and whisker plot:
x1 = randn(128, 1);
x2 = randn(100, 1);
X = [x1; x2];
colors = [0 0.4470 0.7410; 0.8500 0.3250 0.0980];
grp = [ones(size(x1)); 2.*ones(size(x2))];
h = boxplot(X, grp, …
‘Colors’,colors, …
‘Symbol’,’.’)
for j=1:size(h,2)
patch(get(h(5,j),’XData’),get(h(5,j),’YData’),get(h(5,j),’Color’),’FaceAlpha’,.7);
end
The result I get is this one:
What I would like to do is to make the whisker line, the median line and the outline markers all black. The end result would be something like this:
Thanks! plotting, plot MATLAB Answers — New Questions
Run Python function from inside Simulink
Hello!
I have a simulink electric motor example that is being controlled via PWM.
I want the controller that spits out the PWM to be a Python function ( a NN controller I have written in Python INPUT: motor rpm OUT: PWM signal) — and it returns in real time floating point numbers. e.g. 2,504; 2,103 etc.
I want that to be the input for the PWM block in the Simulink model. And the output of the electric motor (rpm) to be the input for the Python function (I have a special measurement input for that function).
Has anybody had any succes with linking .py files and Simulink ?
__________________________________________________________________________________________________________
And to run the python files, do I need to containerize them or to do something special ? Because there are 5 files in the whole project which I will need. I cannot run the function alone.
Thanks a lot!Hello!
I have a simulink electric motor example that is being controlled via PWM.
I want the controller that spits out the PWM to be a Python function ( a NN controller I have written in Python INPUT: motor rpm OUT: PWM signal) — and it returns in real time floating point numbers. e.g. 2,504; 2,103 etc.
I want that to be the input for the PWM block in the Simulink model. And the output of the electric motor (rpm) to be the input for the Python function (I have a special measurement input for that function).
Has anybody had any succes with linking .py files and Simulink ?
__________________________________________________________________________________________________________
And to run the python files, do I need to containerize them or to do something special ? Because there are 5 files in the whole project which I will need. I cannot run the function alone.
Thanks a lot! Hello!
I have a simulink electric motor example that is being controlled via PWM.
I want the controller that spits out the PWM to be a Python function ( a NN controller I have written in Python INPUT: motor rpm OUT: PWM signal) — and it returns in real time floating point numbers. e.g. 2,504; 2,103 etc.
I want that to be the input for the PWM block in the Simulink model. And the output of the electric motor (rpm) to be the input for the Python function (I have a special measurement input for that function).
Has anybody had any succes with linking .py files and Simulink ?
__________________________________________________________________________________________________________
And to run the python files, do I need to containerize them or to do something special ? Because there are 5 files in the whole project which I will need. I cannot run the function alone.
Thanks a lot! python, simulink, electric_motor_control, embedded matlab function MATLAB Answers — New Questions
assignin function does not work from export function
Hello.
We’re using the export function to run an *.mlx file and then export it to a pdf.
I don’t seem to be able to interact with the OS filesystem or store data in the base workspace when the *.mlx is executed using the export function
export("Analyse_Template",filename,PageSize="A4",Run=true,FigureResolution=800,HideCode=true);
% using assignin does not work
assignin(‘base’,’OutPutTable’,OutPutTable)
% using writetable does not work
writetable(inputTable, FName,"WriteMode","append");
Executing the *.mlx file itself produces the desired results.
Why can I not work outside of the scope of the export function?
Many thanks in advance.Hello.
We’re using the export function to run an *.mlx file and then export it to a pdf.
I don’t seem to be able to interact with the OS filesystem or store data in the base workspace when the *.mlx is executed using the export function
export("Analyse_Template",filename,PageSize="A4",Run=true,FigureResolution=800,HideCode=true);
% using assignin does not work
assignin(‘base’,’OutPutTable’,OutPutTable)
% using writetable does not work
writetable(inputTable, FName,"WriteMode","append");
Executing the *.mlx file itself produces the desired results.
Why can I not work outside of the scope of the export function?
Many thanks in advance. Hello.
We’re using the export function to run an *.mlx file and then export it to a pdf.
I don’t seem to be able to interact with the OS filesystem or store data in the base workspace when the *.mlx is executed using the export function
export("Analyse_Template",filename,PageSize="A4",Run=true,FigureResolution=800,HideCode=true);
% using assignin does not work
assignin(‘base’,’OutPutTable’,OutPutTable)
% using writetable does not work
writetable(inputTable, FName,"WriteMode","append");
Executing the *.mlx file itself produces the desired results.
Why can I not work outside of the scope of the export function?
Many thanks in advance. export, live script, assignin MATLAB Answers — New Questions
Merging multiple lines if one range selcted
Hi All, so I have a weird question.
I have created a small hotel template for reservations
I have as you can see below created dates and a range of selections
I was wondering how or what formula (if any) i can use to
when I enter the number of nights the
guest name
booking source
villa size
cost per night and
total cost cells all merge automatically so i don’t have to merge them each time one by one
then what formula do i put in to auto add the cost per night to the number of nights’
sorry if this is confusing but it will help me so so very much
thanks
Steve
Hi All, so I have a weird question. I have created a small hotel template for reservations I have as you can see below created dates and a range of selectionsI was wondering how or what formula (if any) i can use to when I enter the number of nights theguest namebooking sourcevilla sizecost per night andtotal cost cells all merge automatically so i don’t have to merge them each time one by onethen what formula do i put in to auto add the cost per night to the number of nights’ sorry if this is confusing but it will help me so so very much thanks Steve Read More
Error forming mini-batch for network input “input”. Data interpreted with format “SSCB”. To specify a different format, use the InputDataFormats option.
I am working on a binary classification of images.the code i am using is as follows.
In short, the ‘data’ file contains an image as 320*100*2 in its cell. 320 is width, 100 is height and 2 is channel (gmti is a name for channel 1, ref is a name for channel 2).
I have 290 images in total so ‘data’ is a 290*1 cell. 290 as batch, 320*100 as spece, 2 as channel. (SSCB)
For labels, I simply labeled then as double 0 or 1, and used num2str and converted it into categorical.
the error message is as such.
trainnet:
Error forming mini-batch for network input "input". Data interpreted with format "SSCB". To specify a different format, use the InputDataFormats option.
net_trained = trainnet(data,labels_cat, net,’crossentropy’,options);
Cause:
Cell array input supports sequence data only.
I tried changing input layer as sequence and making data format as 320*100*2*290 double. Did not work.
Exactly what is the proper data format should i use?
———————————————————————————————————-
clear
close all
for i = 1 : size(gmti, 1)
data{i,1}(:,:,1) = [gmti{i}];
data{i,1}(:,:,2) = [ref{i}];
end
mm = 1;
for i = size(gmti, 1) + 1 : size(gmti, 1) + size(gmti2, 1)
data{i,1}(:,:,1) = [gmti2{mm}];
data{i,1}(:,:,2) = [ref2{mm}];
mm = mm+1;
end
data2 = zeros(320, 100, 2, 290);
for i = 1 : size(data,1)
data2(:,:,:, i)=data{i, 1};
end
labels = [label; label2];
labels_cat = {};
for i =1 : size(labels, 1)
labels_cat{i, 1} = num2str(labels(i, 1));
end
labels_cat = categorical(labels_cat);
%%
% imds = imageDatastore(data, ‘Labels’,labels_cat);
%%
imageSize = [320 100 2];
numClasses = 2;
stackDepth = [3 4 23 3];
numFilters = [64 128 256 512];
net = resnetNetwork(imageSize,numClasses, …
StackDepth=stackDepth, …
NumFilters=numFilters);
% analyzeNetwork(net)
% net = replaceLayer(net, ‘input’, sequenceInputLayer(imageSize));
options = trainingOptions("sgdm", …
InitialLearnRate=0.01, …
MaxEpochs=100, …
Shuffle="every-epoch", …
Plots="training-progress", …
Verbose=false);
% InputDataFormats = "SSCB", …
%%
%%
net_trained = trainnet(data,labels_cat, net,’crossentropy’,options);I am working on a binary classification of images.the code i am using is as follows.
In short, the ‘data’ file contains an image as 320*100*2 in its cell. 320 is width, 100 is height and 2 is channel (gmti is a name for channel 1, ref is a name for channel 2).
I have 290 images in total so ‘data’ is a 290*1 cell. 290 as batch, 320*100 as spece, 2 as channel. (SSCB)
For labels, I simply labeled then as double 0 or 1, and used num2str and converted it into categorical.
the error message is as such.
trainnet:
Error forming mini-batch for network input "input". Data interpreted with format "SSCB". To specify a different format, use the InputDataFormats option.
net_trained = trainnet(data,labels_cat, net,’crossentropy’,options);
Cause:
Cell array input supports sequence data only.
I tried changing input layer as sequence and making data format as 320*100*2*290 double. Did not work.
Exactly what is the proper data format should i use?
———————————————————————————————————-
clear
close all
for i = 1 : size(gmti, 1)
data{i,1}(:,:,1) = [gmti{i}];
data{i,1}(:,:,2) = [ref{i}];
end
mm = 1;
for i = size(gmti, 1) + 1 : size(gmti, 1) + size(gmti2, 1)
data{i,1}(:,:,1) = [gmti2{mm}];
data{i,1}(:,:,2) = [ref2{mm}];
mm = mm+1;
end
data2 = zeros(320, 100, 2, 290);
for i = 1 : size(data,1)
data2(:,:,:, i)=data{i, 1};
end
labels = [label; label2];
labels_cat = {};
for i =1 : size(labels, 1)
labels_cat{i, 1} = num2str(labels(i, 1));
end
labels_cat = categorical(labels_cat);
%%
% imds = imageDatastore(data, ‘Labels’,labels_cat);
%%
imageSize = [320 100 2];
numClasses = 2;
stackDepth = [3 4 23 3];
numFilters = [64 128 256 512];
net = resnetNetwork(imageSize,numClasses, …
StackDepth=stackDepth, …
NumFilters=numFilters);
% analyzeNetwork(net)
% net = replaceLayer(net, ‘input’, sequenceInputLayer(imageSize));
options = trainingOptions("sgdm", …
InitialLearnRate=0.01, …
MaxEpochs=100, …
Shuffle="every-epoch", …
Plots="training-progress", …
Verbose=false);
% InputDataFormats = "SSCB", …
%%
%%
net_trained = trainnet(data,labels_cat, net,’crossentropy’,options); I am working on a binary classification of images.the code i am using is as follows.
In short, the ‘data’ file contains an image as 320*100*2 in its cell. 320 is width, 100 is height and 2 is channel (gmti is a name for channel 1, ref is a name for channel 2).
I have 290 images in total so ‘data’ is a 290*1 cell. 290 as batch, 320*100 as spece, 2 as channel. (SSCB)
For labels, I simply labeled then as double 0 or 1, and used num2str and converted it into categorical.
the error message is as such.
trainnet:
Error forming mini-batch for network input "input". Data interpreted with format "SSCB". To specify a different format, use the InputDataFormats option.
net_trained = trainnet(data,labels_cat, net,’crossentropy’,options);
Cause:
Cell array input supports sequence data only.
I tried changing input layer as sequence and making data format as 320*100*2*290 double. Did not work.
Exactly what is the proper data format should i use?
———————————————————————————————————-
clear
close all
for i = 1 : size(gmti, 1)
data{i,1}(:,:,1) = [gmti{i}];
data{i,1}(:,:,2) = [ref{i}];
end
mm = 1;
for i = size(gmti, 1) + 1 : size(gmti, 1) + size(gmti2, 1)
data{i,1}(:,:,1) = [gmti2{mm}];
data{i,1}(:,:,2) = [ref2{mm}];
mm = mm+1;
end
data2 = zeros(320, 100, 2, 290);
for i = 1 : size(data,1)
data2(:,:,:, i)=data{i, 1};
end
labels = [label; label2];
labels_cat = {};
for i =1 : size(labels, 1)
labels_cat{i, 1} = num2str(labels(i, 1));
end
labels_cat = categorical(labels_cat);
%%
% imds = imageDatastore(data, ‘Labels’,labels_cat);
%%
imageSize = [320 100 2];
numClasses = 2;
stackDepth = [3 4 23 3];
numFilters = [64 128 256 512];
net = resnetNetwork(imageSize,numClasses, …
StackDepth=stackDepth, …
NumFilters=numFilters);
% analyzeNetwork(net)
% net = replaceLayer(net, ‘input’, sequenceInputLayer(imageSize));
options = trainingOptions("sgdm", …
InitialLearnRate=0.01, …
MaxEpochs=100, …
Shuffle="every-epoch", …
Plots="training-progress", …
Verbose=false);
% InputDataFormats = "SSCB", …
%%
%%
net_trained = trainnet(data,labels_cat, net,’crossentropy’,options); deep learning, resnet, input, data, format, input format MATLAB Answers — New Questions
How to open and modify .dat file
Hello Everyone,
Anyone can help me.
I have one .dat file as attached. According to the manual, the description of my file is 364 × 364 × 110, integer, 8-bit.
Anyone can help how to open my file.
Then how to modify some infi like the geometry.Hello Everyone,
Anyone can help me.
I have one .dat file as attached. According to the manual, the description of my file is 364 × 364 × 110, integer, 8-bit.
Anyone can help how to open my file.
Then how to modify some infi like the geometry. Hello Everyone,
Anyone can help me.
I have one .dat file as attached. According to the manual, the description of my file is 364 × 364 × 110, integer, 8-bit.
Anyone can help how to open my file.
Then how to modify some infi like the geometry. file, image, image analysis, image acquisition, image segmentation, digital image processing, image processing MATLAB Answers — New Questions
Build.27686の不具合二点
Build.27686(CANARY)にアップデートしました。不具合が二つ起きてます。
(1)システムイメージを作成しようとすると、「指定されたモジュールが見つかりません。(0x8007007E)」となり、実行できません。
(2)最適化を実行しようとすると、「SXSHARED_UCRT.dllが見つからないため、コードの実行を続行できません……」と出て、同じく実行できません。
この二つ、原因は同じかもしれません。
Build.27686(CANARY)にアップデートしました。不具合が二つ起きてます。(1)システムイメージを作成しようとすると、「指定されたモジュールが見つかりません。(0x8007007E)」となり、実行できません。(2)最適化を実行しようとすると、「SXSHARED_UCRT.dllが見つからないため、コードの実行を続行できません……」と出て、同じく実行できません。この二つ、原因は同じかもしれません。 Read More
Announcing Public Preview of API Management WordPress plugin to build customized developer portals
Azure API Management has a developer portal that can be customized and deployed by any customer. Today, we are now providing another option for our customers who want a highly customizable developer portal with advanced features such as localization, collapsible and expandable menus, custom stylesheet etc. These customers can now leverage the power of a Content Management System such as WordPress to build and host their developer portal.
WordPress is an open-source Content Management System (CMS) used by over 40% of the web to create websites, blogs, and other applications. It can be deeply customized to fit unique developer portal needs. Further, it has a vibrant community with a rich ecosystem of themes and plugins. Microsoft Azure App service provides customers with a fully managed, performant, secure and scalable hosting solution for WordPress.
Azure API Management WordPress plugin enables our customers to leverage the power of WordPress to build their own unique developer portal. This plugin can be easily deployed and installed and is available in open-source GitHub repository along with installation instructions. In addition, it can be hosted on Azure App Service or any other WordPress hosting provider.
This plugin enables API managers to take advantage of site capabilities in WordPress to customize and add features to the Azure API management developer portal including localization, collapsible and expandable menus, custom stylesheets, file downloads, and more.
You can learn more about the Azure API Management WordPress plugin here. The open-source GitHub repository link is here
Microsoft Tech Community – Latest Blogs –Read More
Why can I not download “Library for interfacing with IIO devices’ using matlab 2018a
Why can I not download "Library for interfacing Library for interfacing Library for interfacing with IIO devices’ using matlab 2018aWhy can I not download "Library for interfacing Library for interfacing Library for interfacing with IIO devices’ using matlab 2018a Why can I not download "Library for interfacing Library for interfacing Library for interfacing with IIO devices’ using matlab 2018a library for interfacing MATLAB Answers — New Questions
Trying to read digital input with F28379D LaunchPad
Hello everyone.
I’m using the F28379D LaunchPad in Simulink and I want to read some Digital Inputs to read the pulses of a quadrature encoder and make a pulse count. I know that the board has built in pins to read quadrature encoder but I want to try reading it by the digital input pins. The problem is that I put a Scope and a Display and the value doesn’t change. I already checked that the encoder works, I tried input a square signal, even using a push button with pull-down resistor and the value doesn’t change at all. Here is the piece of code of what I am doing.
Hope someone can help me. Thanks in advance.Hello everyone.
I’m using the F28379D LaunchPad in Simulink and I want to read some Digital Inputs to read the pulses of a quadrature encoder and make a pulse count. I know that the board has built in pins to read quadrature encoder but I want to try reading it by the digital input pins. The problem is that I put a Scope and a Display and the value doesn’t change. I already checked that the encoder works, I tried input a square signal, even using a push button with pull-down resistor and the value doesn’t change at all. Here is the piece of code of what I am doing.
Hope someone can help me. Thanks in advance. Hello everyone.
I’m using the F28379D LaunchPad in Simulink and I want to read some Digital Inputs to read the pulses of a quadrature encoder and make a pulse count. I know that the board has built in pins to read quadrature encoder but I want to try reading it by the digital input pins. The problem is that I put a Scope and a Display and the value doesn’t change. I already checked that the encoder works, I tried input a square signal, even using a push button with pull-down resistor and the value doesn’t change at all. Here is the piece of code of what I am doing.
Hope someone can help me. Thanks in advance. simulink MATLAB Answers — New Questions
Errors calling python scripts in virtual environment on raspberry pi (MCC Daqhat Library) – with a possible answer
I’m posting this mostly as help to someone else trying to develop a system using MCC’s DAQHATS. There are very little resources regarding using Daqhats from MCC from Matlab (unsupported) or MCC.
The installation of the DAQHAT python library requires that it be installed into a virtual environment. That was causing us issues expecially when we need to run 2 scripts back to back. It would close the virtual environment after the first script.
The following is the question we submitted to Matlab’s help team:
Description: We are using MCC Daqhats. First, I know this is not a supported hardware for Matlab. We are not asking for support for that. However, in the process of installing the python libraries for the Daqhats, we are forced to install them into a virtual environment. We believe this is causing us problems. We need to run multiple scripts in a row. We think that after the first call it is exiting the virtual environment but we are not certain of that.
The matlab file calling the python script is attached. The python script we are calling is attached. We have tested the python script on the PI and it runs properly both from python and the command line.
here is our Matlab error:
Error using datacollection
Error executing command "python3 /home/aset/daqhats/examples/python/mcc172/bert2.py". Details:
STDERR: Traceback (most recent call last):
File "/home/aset/daqhats/examples/python/mcc172/bert2.py", line 3, in <module>
from daqhats import mcc172, OptionFlags, SourceType, HatIDs, HatError
ModuleNotFoundError: No module named ‘daqhats’
Our Solution was as follows: (However others may have a better solution)
We have been able to get it to work by explicitly calling the virtual environment in the system command. This was found using a resource other than a Matlab site.
system(rpi, ‘/home/aset/environments/bin/python3 /home/aset/daqhats/examples/python/mcc172/bert2.py’)I’m posting this mostly as help to someone else trying to develop a system using MCC’s DAQHATS. There are very little resources regarding using Daqhats from MCC from Matlab (unsupported) or MCC.
The installation of the DAQHAT python library requires that it be installed into a virtual environment. That was causing us issues expecially when we need to run 2 scripts back to back. It would close the virtual environment after the first script.
The following is the question we submitted to Matlab’s help team:
Description: We are using MCC Daqhats. First, I know this is not a supported hardware for Matlab. We are not asking for support for that. However, in the process of installing the python libraries for the Daqhats, we are forced to install them into a virtual environment. We believe this is causing us problems. We need to run multiple scripts in a row. We think that after the first call it is exiting the virtual environment but we are not certain of that.
The matlab file calling the python script is attached. The python script we are calling is attached. We have tested the python script on the PI and it runs properly both from python and the command line.
here is our Matlab error:
Error using datacollection
Error executing command "python3 /home/aset/daqhats/examples/python/mcc172/bert2.py". Details:
STDERR: Traceback (most recent call last):
File "/home/aset/daqhats/examples/python/mcc172/bert2.py", line 3, in <module>
from daqhats import mcc172, OptionFlags, SourceType, HatIDs, HatError
ModuleNotFoundError: No module named ‘daqhats’
Our Solution was as follows: (However others may have a better solution)
We have been able to get it to work by explicitly calling the virtual environment in the system command. This was found using a resource other than a Matlab site.
system(rpi, ‘/home/aset/environments/bin/python3 /home/aset/daqhats/examples/python/mcc172/bert2.py’) I’m posting this mostly as help to someone else trying to develop a system using MCC’s DAQHATS. There are very little resources regarding using Daqhats from MCC from Matlab (unsupported) or MCC.
The installation of the DAQHAT python library requires that it be installed into a virtual environment. That was causing us issues expecially when we need to run 2 scripts back to back. It would close the virtual environment after the first script.
The following is the question we submitted to Matlab’s help team:
Description: We are using MCC Daqhats. First, I know this is not a supported hardware for Matlab. We are not asking for support for that. However, in the process of installing the python libraries for the Daqhats, we are forced to install them into a virtual environment. We believe this is causing us problems. We need to run multiple scripts in a row. We think that after the first call it is exiting the virtual environment but we are not certain of that.
The matlab file calling the python script is attached. The python script we are calling is attached. We have tested the python script on the PI and it runs properly both from python and the command line.
here is our Matlab error:
Error using datacollection
Error executing command "python3 /home/aset/daqhats/examples/python/mcc172/bert2.py". Details:
STDERR: Traceback (most recent call last):
File "/home/aset/daqhats/examples/python/mcc172/bert2.py", line 3, in <module>
from daqhats import mcc172, OptionFlags, SourceType, HatIDs, HatError
ModuleNotFoundError: No module named ‘daqhats’
Our Solution was as follows: (However others may have a better solution)
We have been able to get it to work by explicitly calling the virtual environment in the system command. This was found using a resource other than a Matlab site.
system(rpi, ‘/home/aset/environments/bin/python3 /home/aset/daqhats/examples/python/mcc172/bert2.py’) mcc, daqhat, virtual enviroment MATLAB Answers — New Questions
Duffing equation:Transition to Chaos
The Original Equation is the following:
Let . This implies that
Then we eewrite it as a System of First-Order Equations
Using the substitution for , the second-order equation can be transformed into the following system of first-order equations:
Exploring the Effect of .
% Define parameters
gamma = 0.338;
alpha = -1;
beta = 1;
delta = 0.1;
omega = 1.4;
% Define the system of equations
odeSystem = @(t, y) [y(2);
-delta*y(2) – alpha*y(1) – beta*y(1)^3 + gamma*cos(omega*t)];
% Initial conditions
y0 = [0; 0]; % x(0) = 0, v(0) = 0
% Time span
tspan = [0 2000];
% Solve the system
[t, y] = ode45(odeSystem, tspan, y0);
% Plot the results
figure;
plot(t, y(:, 1));
xlabel(‘Time’);
ylabel(‘x(t)’);
title(‘Solution of the nonlinear system’);
grid on;
% Plot the phase portrait
figure;
plot(y(:, 1), y(:, 2));
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.318$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
% Define the tail (e.g., last 10% of the time interval)
tail_start = floor(0.9 * length(t)); % Starting index for the tail
tail_end = length(t); % Ending index for the tail
% Plot the tail of the solution
figure;
plot(y(tail_start:tail_end, 1), y(tail_start:tail_end, 2), ‘r’, ‘LineWidth’, 1.5);
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.318$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
ax = gca;
chart = ax.Children(1);
datatip(chart,0.5581,-0.1126);
Then I used but the results were not that I expected for
My code gives me the following. Any suggestion?
% Define parameters
gamma = 0.35;
alpha = -1;
beta = 1;
delta = 0.1;
omega = 1.4;
% Define the system of equations
odeSystem = @(t, y) [y(2);
-delta*y(2) – alpha*y(1) – beta*y(1)^3 + gamma*cos(omega*t)];
% Initial conditions
y0 = [0; 0]; % x(0) = 0, v(0) = 0
% Time span
tspan = [0 3000];
% Solve the system
[t, y] = ode45(odeSystem, tspan, y0);
% Plot the phase portrait
figure;
plot(y(:, 1), y(:, 2));
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.318$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
% Define the tail (e.g., last 10% of the time interval)
tail_start = floor(0.9 * length(t)); % Starting index for the tail
tail_end = length(t); % Ending index for the tail
% Plot the tail of the solution
figure;
plot(y(tail_start:tail_end, 1), y(tail_start:tail_end, 2), ‘r’, ‘LineWidth’, 1.5);
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.35$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
ax = gca;
chart = ax.Children(1);
datatip(chart,0.5581,-0.1126);The Original Equation is the following:
Let . This implies that
Then we eewrite it as a System of First-Order Equations
Using the substitution for , the second-order equation can be transformed into the following system of first-order equations:
Exploring the Effect of .
% Define parameters
gamma = 0.338;
alpha = -1;
beta = 1;
delta = 0.1;
omega = 1.4;
% Define the system of equations
odeSystem = @(t, y) [y(2);
-delta*y(2) – alpha*y(1) – beta*y(1)^3 + gamma*cos(omega*t)];
% Initial conditions
y0 = [0; 0]; % x(0) = 0, v(0) = 0
% Time span
tspan = [0 2000];
% Solve the system
[t, y] = ode45(odeSystem, tspan, y0);
% Plot the results
figure;
plot(t, y(:, 1));
xlabel(‘Time’);
ylabel(‘x(t)’);
title(‘Solution of the nonlinear system’);
grid on;
% Plot the phase portrait
figure;
plot(y(:, 1), y(:, 2));
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.318$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
% Define the tail (e.g., last 10% of the time interval)
tail_start = floor(0.9 * length(t)); % Starting index for the tail
tail_end = length(t); % Ending index for the tail
% Plot the tail of the solution
figure;
plot(y(tail_start:tail_end, 1), y(tail_start:tail_end, 2), ‘r’, ‘LineWidth’, 1.5);
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.318$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
ax = gca;
chart = ax.Children(1);
datatip(chart,0.5581,-0.1126);
Then I used but the results were not that I expected for
My code gives me the following. Any suggestion?
% Define parameters
gamma = 0.35;
alpha = -1;
beta = 1;
delta = 0.1;
omega = 1.4;
% Define the system of equations
odeSystem = @(t, y) [y(2);
-delta*y(2) – alpha*y(1) – beta*y(1)^3 + gamma*cos(omega*t)];
% Initial conditions
y0 = [0; 0]; % x(0) = 0, v(0) = 0
% Time span
tspan = [0 3000];
% Solve the system
[t, y] = ode45(odeSystem, tspan, y0);
% Plot the phase portrait
figure;
plot(y(:, 1), y(:, 2));
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.318$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
% Define the tail (e.g., last 10% of the time interval)
tail_start = floor(0.9 * length(t)); % Starting index for the tail
tail_end = length(t); % Ending index for the tail
% Plot the tail of the solution
figure;
plot(y(tail_start:tail_end, 1), y(tail_start:tail_end, 2), ‘r’, ‘LineWidth’, 1.5);
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.35$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
ax = gca;
chart = ax.Children(1);
datatip(chart,0.5581,-0.1126); The Original Equation is the following:
Let . This implies that
Then we eewrite it as a System of First-Order Equations
Using the substitution for , the second-order equation can be transformed into the following system of first-order equations:
Exploring the Effect of .
% Define parameters
gamma = 0.338;
alpha = -1;
beta = 1;
delta = 0.1;
omega = 1.4;
% Define the system of equations
odeSystem = @(t, y) [y(2);
-delta*y(2) – alpha*y(1) – beta*y(1)^3 + gamma*cos(omega*t)];
% Initial conditions
y0 = [0; 0]; % x(0) = 0, v(0) = 0
% Time span
tspan = [0 2000];
% Solve the system
[t, y] = ode45(odeSystem, tspan, y0);
% Plot the results
figure;
plot(t, y(:, 1));
xlabel(‘Time’);
ylabel(‘x(t)’);
title(‘Solution of the nonlinear system’);
grid on;
% Plot the phase portrait
figure;
plot(y(:, 1), y(:, 2));
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.318$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
% Define the tail (e.g., last 10% of the time interval)
tail_start = floor(0.9 * length(t)); % Starting index for the tail
tail_end = length(t); % Ending index for the tail
% Plot the tail of the solution
figure;
plot(y(tail_start:tail_end, 1), y(tail_start:tail_end, 2), ‘r’, ‘LineWidth’, 1.5);
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.318$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
ax = gca;
chart = ax.Children(1);
datatip(chart,0.5581,-0.1126);
Then I used but the results were not that I expected for
My code gives me the following. Any suggestion?
% Define parameters
gamma = 0.35;
alpha = -1;
beta = 1;
delta = 0.1;
omega = 1.4;
% Define the system of equations
odeSystem = @(t, y) [y(2);
-delta*y(2) – alpha*y(1) – beta*y(1)^3 + gamma*cos(omega*t)];
% Initial conditions
y0 = [0; 0]; % x(0) = 0, v(0) = 0
% Time span
tspan = [0 3000];
% Solve the system
[t, y] = ode45(odeSystem, tspan, y0);
% Plot the phase portrait
figure;
plot(y(:, 1), y(:, 2));
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.318$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
% Define the tail (e.g., last 10% of the time interval)
tail_start = floor(0.9 * length(t)); % Starting index for the tail
tail_end = length(t); % Ending index for the tail
% Plot the tail of the solution
figure;
plot(y(tail_start:tail_end, 1), y(tail_start:tail_end, 2), ‘r’, ‘LineWidth’, 1.5);
xlabel(‘x(t)’);
ylabel(‘v(t)’);
title(‘Phase-Plane $$ddot{x}+delta dot{x}+alpha x+beta x^3=0$$ for $$gamma=0.35$$, $$alpha=-1$$,$$beta=1$$,$$delta=0.1$$,$$omega=1.4$$’,’Interpreter’, ‘latex’);
grid on;
ax = gca;
chart = ax.Children(1);
datatip(chart,0.5581,-0.1126); ode45, duffing equation, plot, differential equations, plotting MATLAB Answers — New Questions
draw first principal component line 1 in the raw data
I have the data
WireLength 1 4 5 6 8 10 12 14 13 18 19 21
DieHeight 125 110 287 200 350 280 400 371 480 420 540 518
where Wirelength is the x variable and DieHeight is the y variable
I want to draw first and second principal component line in the raw data also draw the orthogonal lines from the point to the line.I have the data
WireLength 1 4 5 6 8 10 12 14 13 18 19 21
DieHeight 125 110 287 200 350 280 400 371 480 420 540 518
where Wirelength is the x variable and DieHeight is the y variable
I want to draw first and second principal component line in the raw data also draw the orthogonal lines from the point to the line. I have the data
WireLength 1 4 5 6 8 10 12 14 13 18 19 21
DieHeight 125 110 287 200 350 280 400 371 480 420 540 518
where Wirelength is the x variable and DieHeight is the y variable
I want to draw first and second principal component line in the raw data also draw the orthogonal lines from the point to the line. principal component analysis MATLAB Answers — New Questions
CVE-2024-38063 – Disabling IPv6 binding = fix – or not?
Dear community,
in today’s LinkedIn Stream and other social media you might have noticed a recent CVE and the recommendation to disable IPv6 in Windows Server and Windows Client.
We are talking about this one:
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-38063
Reading the advisory carefully, Microsoft, strictly speaking, recommend disabling IPv6.
Citing:
“Mitigation refers to a setting, common configuration, or general best-practice, existing in a default state, that could reduce the severity of exploitation of a vulnerability. The following mitigating factors might be helpful in your situation:
Systems are not affected if IPv6 is disabled on the target machine.”
Maybe I am a bit nitpicking here about old experiences and would greatly appreciate a refreshed Microsoft statement on the disablement (unbinding) of IPv6 and the side-effects in 2024.
What we have learned in the past
– do no disable IPv6 easily.
– yes, you will face issues, even with critical domain controllers with Dual Stack ISPs and SoHo routers messing up your DNS.
What’s the fuss about IPv6. I do not use it in corporate or at home.
IPv6 is being used in Windows. More specifically non-routable fe80 addresses and loopback ::1 for internal purposes of Windows or other software. One may complain use cases are – unrightfully – not well and transparent documented.
Have a read in the past
Here are some references that Copilot brings up. Trust my memory, I’ve read more like this.
https://community.spiceworks.com/t/is-it-a-bad-practice-to-disabe-ipv6/781811/9
https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-ipv6-in-windows
My personal conclusion
Hold on, we need patches for this CVE, but we should not disable IPv6 easily.
Please disable IPv6 temporarily, when you cannot patch this CVE immediately / in time.
Take notes which system you have had to disable and consider re-enabling once patches have been tested and applied.
I am sad to see that NetSec people, undoubtedly experts in their area, jump on the bandwaggon esp. on Social Media to easily disgrace the IPv6 by default enablement of Windows Client and Windows Server, telling the easier story: Disable IPv6 and you are good / if you do not need it.
You might not know you “need” it in the first place.
Whenever you are changing system defaults in Windows, mind that Microsoft and other software vendors may not consider these changes in their testing.
And the Crowdstrike Black Friday showed us clearly how outlier system configs and unwell testing goes along. Not very well.
IPv6 usage and defaults today
One of the most recent example that Microsoft is using IPv6 can be found in the Azure Arc Agent (Connected Machine Agent) changelog:
“Better handling when IPv6 local loopback is disabled”
source: https://learn.microsoft.com/en-us/azure/azure-arc/servers/agent-release-notes
How can I disable IPv6, if required?
Many roads led to Rome. Windows + X > Terminal / PowerShell (Admin)
#save current NIC config into a simple text file
Get-NetAdapterBinding -ComponentID “ms_tcpip6” | where Enabled -eq $true | Out-File $env:temporiginal-ipv6-config.txt
#disable IPv6 on all adapters
Get-NetAdapterBinding -ComponentID “ms_tcpip6” | where Enabled -eq $true | Disable-NetAdapterBinding
And how to revert the change?
Windows + X > Terminal / PowerShell (Admin)
#enable IPv6 on all adapters (mind the text file)
Get-NetAdapterBinding -ComponentID “ms_tcpip6” | where Enabled -eq $true | Enable-NetAdapterBinding
TL:DR
Microsoft is using fe80 addresses and loopback ::1 addresses for internal reasons.
IPv6 is preferrably used over IPv4 when it is bound to a network adapter, including said special non- routable addresses.
Please disable IPv6 temporarily, when you cannot patch this CVE immediately / in time. Take notes of current config.
Please share the word and mind the that disabling IPv6 can turn your OS into an outlier system, causing immediate or later issue due lack of testing.
Dear community,
in today’s LinkedIn Stream and other social media you might have noticed a recent CVE and the recommendation to disable IPv6 in Windows Server and Windows Client.
We are talking about this one:https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-38063Reading the advisory carefully, Microsoft, strictly speaking, recommend disabling IPv6.Citing: “Mitigation refers to a setting, common configuration, or general best-practice, existing in a default state, that could reduce the severity of exploitation of a vulnerability. The following mitigating factors might be helpful in your situation:
Systems are not affected if IPv6 is disabled on the target machine.”
Maybe I am a bit nitpicking here about old experiences and would greatly appreciate a refreshed Microsoft statement on the disablement (unbinding) of IPv6 and the side-effects in 2024.What we have learned in the past
– do no disable IPv6 easily.
– yes, you will face issues, even with critical domain controllers with Dual Stack ISPs and SoHo routers messing up your DNS.What’s the fuss about IPv6. I do not use it in corporate or at home.IPv6 is being used in Windows. More specifically non-routable fe80 addresses and loopback ::1 for internal purposes of Windows or other software. One may complain use cases are – unrightfully – not well and transparent documented.
Have a read in the pastHere are some references that Copilot brings up. Trust my memory, I’ve read more like this.
https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/ipv6-for-the-windows-administrator-why-you-need-to-care-about/ba-p/256251
https://community.spiceworks.com/t/is-it-a-bad-practice-to-disabe-ipv6/781811/9
https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-ipv6-in-windows
My personal conclusion
Hold on, we need patches for this CVE, but we should not disable IPv6 easily.Please disable IPv6 temporarily, when you cannot patch this CVE immediately / in time.Take notes which system you have had to disable and consider re-enabling once patches have been tested and applied.I am sad to see that NetSec people, undoubtedly experts in their area, jump on the bandwaggon esp. on Social Media to easily disgrace the IPv6 by default enablement of Windows Client and Windows Server, telling the easier story: Disable IPv6 and you are good / if you do not need it.You might not know you “need” it in the first place.Whenever you are changing system defaults in Windows, mind that Microsoft and other software vendors may not consider these changes in their testing.And the Crowdstrike Black Friday showed us clearly how outlier system configs and unwell testing goes along. Not very well.IPv6 usage and defaults todayOne of the most recent example that Microsoft is using IPv6 can be found in the Azure Arc Agent (Connected Machine Agent) changelog:
“Better handling when IPv6 local loopback is disabled”source: https://learn.microsoft.com/en-us/azure/azure-arc/servers/agent-release-notesHow can I disable IPv6, if required?
Many roads led to Rome. Windows + X > Terminal / PowerShell (Admin)#save current NIC config into a simple text fileGet-NetAdapterBinding -ComponentID “ms_tcpip6” | where Enabled -eq $true | Out-File $env:temporiginal-ipv6-config.txt#disable IPv6 on all adaptersGet-NetAdapterBinding -ComponentID “ms_tcpip6” | where Enabled -eq $true | Disable-NetAdapterBinding
And how to revert the change?Windows + X > Terminal / PowerShell (Admin)#enable IPv6 on all adapters (mind the text file)Get-NetAdapterBinding -ComponentID “ms_tcpip6” | where Enabled -eq $true | Enable-NetAdapterBindingTL:DR
Microsoft is using fe80 addresses and loopback ::1 addresses for internal reasons.IPv6 is preferrably used over IPv4 when it is bound to a network adapter, including said special non- routable addresses.Please disable IPv6 temporarily, when you cannot patch this CVE immediately / in time. Take notes of current config.
Please share the word and mind the that disabling IPv6 can turn your OS into an outlier system, causing immediate or later issue due lack of testing. Read More
Logic Apps – Tracked properties for HTTP action`s INPUTS not working
Can someone help me and tell me why tracked properties for HTTP action`s INPUTS not working
I get an error:
TrackedPropertiesEvaluationFailed
In case for OUTPUTS everything works
@{outputs(‘HTTP_2’)?[‘statusCode’]}
@{inputs(‘HTTP_2’)?[‘uri’]}
https://learn.microsoft.com/en-us/azure/logic-apps/monitor-workflows-collect-diagnostic-data?tabs=consumption
Can someone help me and tell me why tracked properties for HTTP action`s INPUTS not workingI get an error:TrackedPropertiesEvaluationFailed Failed to evaluate the tracked properties for action ‘HTTP_2’. Error details: ‘The template function ‘inputs’ is not defined or not valid.’.In case for OUTPUTS everything works My tracked properties are@{outputs(‘HTTP_2’)?[‘statusCode’]}@{inputs(‘HTTP_2’)?[‘uri’]}The documentation says that input is supported.https://learn.microsoft.com/en-us/azure/logic-apps/monitor-workflows-collect-diagnostic-data?tabs=consumption Read More
Use your organization’s branding with Copilot in PowerPoint
Hello Members,
I’m trying to get Copilot to use the organization’s template, but it’s not working. It seems unable to apply the template.
Link: Use your organization’s branding with Copilot in PowerPoint – Microsoft Support
Has anyone successfully used a template? If so, could you share a working one?
I appreciate your help.
Hello Members,I’m trying to get Copilot to use the organization’s template, but it’s not working. It seems unable to apply the template.Link: Use your organization’s branding with Copilot in PowerPoint – Microsoft SupportHas anyone successfully used a template? If so, could you share a working one?I appreciate your help. Read More
Is it possible to find the line-of-sight for coarsely spaced and uneven terrain data points?
Thank you for taking the time to help me with this. I’m using MATLAB R2024a. Here is my code:
% Create coarse-uneven data points
Xc = [5 7 11 17 27 40 59 82 129 191];
Yc = [-5 -2 2 0 3 -4 0 4 0 7];
% Basic parameters for observer and lines-of-sight
height = 5.2;
distance = 200;
radians = -pi/4:pi/24:0;
% Coordinates for intersecting lines
[X2, Y2] = pol2cart(radians, distance);
Y2 = Y2 + height;
X1 = zeros(size(X2));
Y1 = zeros(size(Y2)) + height;
% Plotting
figure
plot(Xc, Yc, ‘-r’)
hold on
plot([X1; X2], [Y1; Y2], ‘-b’)
hold off
As you can see, the x-component of the terrain is coarse and unevenly spaced. I would like to identify which terrain datapoints (Xc and Yc) are within line-of-sight of each "slice" of the observer’s vision. In the attached picture, there are four data points within the first sector of vision. It is likely that the second data point and most certainly the fourth data point would be obscured by the terrain pattern. How can I caluclate the line-of-sight for this and extract the Xc components that fall within line of sight of the observer who is positioned at x=0 and y=height?
Ideally, the output would be an NxM logical array where N is the number of vision sectors and M is the length of Xc. The values contained along M in the matrix would represent with boolean true/false values the indices of Xc in which (Xc,Yc) is visible by the observer for the Nth vision sector.
From what I’ve seen, los() and los2() take inputs in a much different format than just 2-D cartesian points and lines, so I haven’t been able to figure it out using those functions.
Once again, thank you for your time.Thank you for taking the time to help me with this. I’m using MATLAB R2024a. Here is my code:
% Create coarse-uneven data points
Xc = [5 7 11 17 27 40 59 82 129 191];
Yc = [-5 -2 2 0 3 -4 0 4 0 7];
% Basic parameters for observer and lines-of-sight
height = 5.2;
distance = 200;
radians = -pi/4:pi/24:0;
% Coordinates for intersecting lines
[X2, Y2] = pol2cart(radians, distance);
Y2 = Y2 + height;
X1 = zeros(size(X2));
Y1 = zeros(size(Y2)) + height;
% Plotting
figure
plot(Xc, Yc, ‘-r’)
hold on
plot([X1; X2], [Y1; Y2], ‘-b’)
hold off
As you can see, the x-component of the terrain is coarse and unevenly spaced. I would like to identify which terrain datapoints (Xc and Yc) are within line-of-sight of each "slice" of the observer’s vision. In the attached picture, there are four data points within the first sector of vision. It is likely that the second data point and most certainly the fourth data point would be obscured by the terrain pattern. How can I caluclate the line-of-sight for this and extract the Xc components that fall within line of sight of the observer who is positioned at x=0 and y=height?
Ideally, the output would be an NxM logical array where N is the number of vision sectors and M is the length of Xc. The values contained along M in the matrix would represent with boolean true/false values the indices of Xc in which (Xc,Yc) is visible by the observer for the Nth vision sector.
From what I’ve seen, los() and los2() take inputs in a much different format than just 2-D cartesian points and lines, so I haven’t been able to figure it out using those functions.
Once again, thank you for your time. Thank you for taking the time to help me with this. I’m using MATLAB R2024a. Here is my code:
% Create coarse-uneven data points
Xc = [5 7 11 17 27 40 59 82 129 191];
Yc = [-5 -2 2 0 3 -4 0 4 0 7];
% Basic parameters for observer and lines-of-sight
height = 5.2;
distance = 200;
radians = -pi/4:pi/24:0;
% Coordinates for intersecting lines
[X2, Y2] = pol2cart(radians, distance);
Y2 = Y2 + height;
X1 = zeros(size(X2));
Y1 = zeros(size(Y2)) + height;
% Plotting
figure
plot(Xc, Yc, ‘-r’)
hold on
plot([X1; X2], [Y1; Y2], ‘-b’)
hold off
As you can see, the x-component of the terrain is coarse and unevenly spaced. I would like to identify which terrain datapoints (Xc and Yc) are within line-of-sight of each "slice" of the observer’s vision. In the attached picture, there are four data points within the first sector of vision. It is likely that the second data point and most certainly the fourth data point would be obscured by the terrain pattern. How can I caluclate the line-of-sight for this and extract the Xc components that fall within line of sight of the observer who is positioned at x=0 and y=height?
Ideally, the output would be an NxM logical array where N is the number of vision sectors and M is the length of Xc. The values contained along M in the matrix would represent with boolean true/false values the indices of Xc in which (Xc,Yc) is visible by the observer for the Nth vision sector.
From what I’ve seen, los() and los2() take inputs in a much different format than just 2-D cartesian points and lines, so I haven’t been able to figure it out using those functions.
Once again, thank you for your time. los, line-of-sight, vectorization, geometry, geography, interpolation, vectors, surface, indexing, nonlinear, find, plot, signal processing MATLAB Answers — New Questions
Changing Teams Default Layout from Grid To Lines.
I’m currently facing a challenge at work and could use some advice from the community. My boss wants to standardize the Microsoft Teams layout across all computers in our organization. As the Teams administrator, I’m tasked with figuring out how to do this efficiently.
I’ve been exploring various options and came across the settings.json files in the Teams directory. However, I couldn’t find a specific setting in these files that directly controls the Teams layout view (e.g., switching to List view).
Here’s what I’ve tried so far:
Teams Admin Center: I navigated to the Teams admin center and looked into meeting policies and settings, but there doesn’t seem to be a straightforward option for setting the layout view for all users.
Local Configuration Files: I examined the settings.json files located in %APPDATA%MicrosoftTeams, but these files contain a plethora of settings and none that clearly indicate layout preferences.
Questions:
Is there a way to set the Teams layout view (e.g., List view) for all users through the Teams admin center or any other centralized method?
Has anyone successfully modified the settings.json or any other configuration file to achieve this? If so, could you provide guidance on which settings to change?
Any insights or suggestions would be greatly appreciated. Thanks in advance for your help!
I’m currently facing a challenge at work and could use some advice from the community. My boss wants to standardize the Microsoft Teams layout across all computers in our organization. As the Teams administrator, I’m tasked with figuring out how to do this efficiently.I’ve been exploring various options and came across the settings.json files in the Teams directory. However, I couldn’t find a specific setting in these files that directly controls the Teams layout view (e.g., switching to List view).Here’s what I’ve tried so far:Teams Admin Center: I navigated to the Teams admin center and looked into meeting policies and settings, but there doesn’t seem to be a straightforward option for setting the layout view for all users.Local Configuration Files: I examined the settings.json files located in %APPDATA%MicrosoftTeams, but these files contain a plethora of settings and none that clearly indicate layout preferences.Questions:Is there a way to set the Teams layout view (e.g., List view) for all users through the Teams admin center or any other centralized method?Has anyone successfully modified the settings.json or any other configuration file to achieve this? If so, could you provide guidance on which settings to change?Any insights or suggestions would be greatly appreciated. Thanks in advance for your help! Read More