Category: News
Conversion to double from cell is not possible
I’m working with a script that simulates a communication channel, and am running into a "Conversion to doube from cell is not possible". The line throing an error works normally in a script, however when I put it inside a custom defined function within my script I get an error.
R is a 1339×17 double
D is a 16384×1 double
N, Npst, and Npre are constants of 1352, 13, and 2, respectively.
How could I cast the cell into a double without having an error being thrown?
Thanks!I’m working with a script that simulates a communication channel, and am running into a "Conversion to doube from cell is not possible". The line throing an error works normally in a script, however when I put it inside a custom defined function within my script I get an error.
R is a 1339×17 double
D is a 16384×1 double
N, Npst, and Npre are constants of 1352, 13, and 2, respectively.
How could I cast the cell into a double without having an error being thrown?
Thanks! I’m working with a script that simulates a communication channel, and am running into a "Conversion to doube from cell is not possible". The line throing an error works normally in a script, however when I put it inside a custom defined function within my script I get an error.
R is a 1339×17 double
D is a 16384×1 double
N, Npst, and Npre are constants of 1352, 13, and 2, respectively.
How could I cast the cell into a double without having an error being thrown?
Thanks! matlab, cell, double, conversion error MATLAB Answers — New Questions
Mesh for Teams license for government
I work for the government. Looking in our Microsoft 365 admin center, I see we own:
Microsoft 365 G3 GCC Microsoft 365 G3 GCC
Microsoft 365 G5 Compliance GCC Microsoft 365 G5 Compliance GCC
Microsoft 365 G5 Security GCC Microsoft 365 G5 Security GCC
Microsoft Teams Premium for GCC Introductory Pricing Microsoft Teams Premium for GCC Introductory Pricing
Microsoft Teams Rooms Pro for GCC Microsoft Teams Rooms Pro for GCC
Do we have license for Mesh for Teams? I ask because per aka.ms/meshprep, there is mention of Premium license in a tenant for “Commercial”.
I work for the government. Looking in our Microsoft 365 admin center, I see we own:Microsoft 365 G3 GCC Microsoft 365 G3 GCCMicrosoft 365 G5 Compliance GCC Microsoft 365 G5 Compliance GCCMicrosoft 365 G5 Security GCC Microsoft 365 G5 Security GCCMicrosoft Teams Premium for GCC Introductory Pricing Microsoft Teams Premium for GCC Introductory PricingMicrosoft Teams Rooms Pro for GCC Microsoft Teams Rooms Pro for GCC Do we have license for Mesh for Teams? I ask because per aka.ms/meshprep, there is mention of Premium license in a tenant for “Commercial”. Read More
Hybrid TaskBar
Personally, I think it’d be nice to have a windows 11 setting that has the apps and search bar in the middle and the windows bar in the bottom left, due to the fact it’s been there for about 30 years, so it’s a hard habit to break for those who were there from the start.
Personally, I think it’d be nice to have a windows 11 setting that has the apps and search bar in the middle and the windows bar in the bottom left, due to the fact it’s been there for about 30 years, so it’s a hard habit to break for those who were there from the start. Read More
“Ugh-oh, there was a problem while creating your booking page” – all users unable to create bookings
All of our users are unable to create shared bookings pages. We have tried via Teams and signed in to Office.com, trying on multiple web browsers. All users have the Microsoft Bookings app assignment granted in 365 Admin Center. I have also turned off Bookings using Powershell, and turned it back on with no success.
Is Bookings as a service working for others? Some users are also reporting that personal bookings calendars have disappeared.
Error attached here:
All of our users are unable to create shared bookings pages. We have tried via Teams and signed in to Office.com, trying on multiple web browsers. All users have the Microsoft Bookings app assignment granted in 365 Admin Center. I have also turned off Bookings using Powershell, and turned it back on with no success. Is Bookings as a service working for others? Some users are also reporting that personal bookings calendars have disappeared. Error attached here: Read More
Pop up reminder based when specific wording is present (VBA or Macro?)
I am trying to create a pop up message/reminder/alert when certain projects read “Overdue” in certain cells.
Is there a simple formula or code that can notify when a cell reads Overdue?
Once I enter dates for my many projects, there are formulas for each project that show when the due date is and whether the project is currently “Not due or Overdue” based on those dates/data.
I am looking to have a pop up reminder or Macro of some sort that I can quickly check if any dates are “Overdue”.
Any and all help is much appreciated !
I am trying to create a pop up message/reminder/alert when certain projects read “Overdue” in certain cells. Is there a simple formula or code that can notify when a cell reads Overdue? Once I enter dates for my many projects, there are formulas for each project that show when the due date is and whether the project is currently “Not due or Overdue” based on those dates/data. I am looking to have a pop up reminder or Macro of some sort that I can quickly check if any dates are “Overdue”. Any and all help is much appreciated ! Read More
Finding mode of each row in an array of Strings
Currently I have an array with 3 columns and a lot of rows (about 50,000). Each value is a string I essentially want to compare the 3 values in a row and find the most common.
Say my input table looked like the following
Apple Bannana Apple
Cherry Cherry Apple
Mango Mango Mango
My outputs would be
Apple
Cherry
Mango
Please let me know if there is any advice, I have tried mode but it does not work for strings.Currently I have an array with 3 columns and a lot of rows (about 50,000). Each value is a string I essentially want to compare the 3 values in a row and find the most common.
Say my input table looked like the following
Apple Bannana Apple
Cherry Cherry Apple
Mango Mango Mango
My outputs would be
Apple
Cherry
Mango
Please let me know if there is any advice, I have tried mode but it does not work for strings. Currently I have an array with 3 columns and a lot of rows (about 50,000). Each value is a string I essentially want to compare the 3 values in a row and find the most common.
Say my input table looked like the following
Apple Bannana Apple
Cherry Cherry Apple
Mango Mango Mango
My outputs would be
Apple
Cherry
Mango
Please let me know if there is any advice, I have tried mode but it does not work for strings. table, matrices MATLAB Answers — New Questions
How to give range of cells different variable names?
Hello!
I am collecting data from a range of cells from an .xlsx file using the readmatrix function as so:
Datafiles(j).data = readmatrix(Data,’Sheet’,’Report’,’Range’,’M18:N18′,’FileType’,’spreadsheet’);
Then I populate that data into a new excel file like so:
CurrentData = {Datafiles.data}’;
TABLE_Pass = table(CurrentData);
TABLE = vertcat(TABLE_Pass);
Now, my problem is, it spits out the data in 2 columns labeled "CurrentData_1" "CurrentData_2" and I want to specify the name of the second column.
When I create a second variable name, it gives me 4 columns with the information doubled.
Any tips on how to give the data 2 separate variable names?Hello!
I am collecting data from a range of cells from an .xlsx file using the readmatrix function as so:
Datafiles(j).data = readmatrix(Data,’Sheet’,’Report’,’Range’,’M18:N18′,’FileType’,’spreadsheet’);
Then I populate that data into a new excel file like so:
CurrentData = {Datafiles.data}’;
TABLE_Pass = table(CurrentData);
TABLE = vertcat(TABLE_Pass);
Now, my problem is, it spits out the data in 2 columns labeled "CurrentData_1" "CurrentData_2" and I want to specify the name of the second column.
When I create a second variable name, it gives me 4 columns with the information doubled.
Any tips on how to give the data 2 separate variable names? Hello!
I am collecting data from a range of cells from an .xlsx file using the readmatrix function as so:
Datafiles(j).data = readmatrix(Data,’Sheet’,’Report’,’Range’,’M18:N18′,’FileType’,’spreadsheet’);
Then I populate that data into a new excel file like so:
CurrentData = {Datafiles.data}’;
TABLE_Pass = table(CurrentData);
TABLE = vertcat(TABLE_Pass);
Now, my problem is, it spits out the data in 2 columns labeled "CurrentData_1" "CurrentData_2" and I want to specify the name of the second column.
When I create a second variable name, it gives me 4 columns with the information doubled.
Any tips on how to give the data 2 separate variable names? importing excel data MATLAB Answers — New Questions
colorbar graph exceeding matrix values
So I’m plotting a 4D matrix, called Ft, that ranges from 0-1, but when I graph it and add a colorbar, it’s showing 0-2 for physical states 4-15, and (-1)-1for physical state 1-3
physical states 1-3 are 0 for every timestep in the matrix Ft, so that first graph makes sense. Why does the colorbar range change for the other graphs?
Here’s the code for the graphs. Let me know if more code is needed to create the actual Ft matrix. [[ my entire code would be needed in order to create this matrix ]]
%the setup of Ft is Ft(state,est of patch1,est of patch2,timestep)
B = permute(Ft,[2 3 1 4]);
for state= 1:15
figure(state)
sgtitle([‘physical state = ‘ num2str(state)])
time = 1;
subplot(4,5,time)
imagesc(B(:,:,state,time))
title([‘timestep : ‘ num2str(time)])
xlabel(‘est. of patch 2 quality’);
ylabel(‘est. of patch 1 quality’);
set(gca,’ydir’,’normal’)
for time = 2:19
subplot(4,5,time)
imagesc(B(:,:,state,time))
title(num2str(time))
set(gca,’ydir’,’normal’)
for time = 20
subplot(4,5,time)
imagesc(B(:,:,state,time))
title(num2str(time))
set(gca,’ydir’,’normal’)
colormap hot
colorbar
hold on
end
end
endSo I’m plotting a 4D matrix, called Ft, that ranges from 0-1, but when I graph it and add a colorbar, it’s showing 0-2 for physical states 4-15, and (-1)-1for physical state 1-3
physical states 1-3 are 0 for every timestep in the matrix Ft, so that first graph makes sense. Why does the colorbar range change for the other graphs?
Here’s the code for the graphs. Let me know if more code is needed to create the actual Ft matrix. [[ my entire code would be needed in order to create this matrix ]]
%the setup of Ft is Ft(state,est of patch1,est of patch2,timestep)
B = permute(Ft,[2 3 1 4]);
for state= 1:15
figure(state)
sgtitle([‘physical state = ‘ num2str(state)])
time = 1;
subplot(4,5,time)
imagesc(B(:,:,state,time))
title([‘timestep : ‘ num2str(time)])
xlabel(‘est. of patch 2 quality’);
ylabel(‘est. of patch 1 quality’);
set(gca,’ydir’,’normal’)
for time = 2:19
subplot(4,5,time)
imagesc(B(:,:,state,time))
title(num2str(time))
set(gca,’ydir’,’normal’)
for time = 20
subplot(4,5,time)
imagesc(B(:,:,state,time))
title(num2str(time))
set(gca,’ydir’,’normal’)
colormap hot
colorbar
hold on
end
end
end So I’m plotting a 4D matrix, called Ft, that ranges from 0-1, but when I graph it and add a colorbar, it’s showing 0-2 for physical states 4-15, and (-1)-1for physical state 1-3
physical states 1-3 are 0 for every timestep in the matrix Ft, so that first graph makes sense. Why does the colorbar range change for the other graphs?
Here’s the code for the graphs. Let me know if more code is needed to create the actual Ft matrix. [[ my entire code would be needed in order to create this matrix ]]
%the setup of Ft is Ft(state,est of patch1,est of patch2,timestep)
B = permute(Ft,[2 3 1 4]);
for state= 1:15
figure(state)
sgtitle([‘physical state = ‘ num2str(state)])
time = 1;
subplot(4,5,time)
imagesc(B(:,:,state,time))
title([‘timestep : ‘ num2str(time)])
xlabel(‘est. of patch 2 quality’);
ylabel(‘est. of patch 1 quality’);
set(gca,’ydir’,’normal’)
for time = 2:19
subplot(4,5,time)
imagesc(B(:,:,state,time))
title(num2str(time))
set(gca,’ydir’,’normal’)
for time = 20
subplot(4,5,time)
imagesc(B(:,:,state,time))
title(num2str(time))
set(gca,’ydir’,’normal’)
colormap hot
colorbar
hold on
end
end
end graph, colorbar MATLAB Answers — New Questions
code of load flow equation four buses
clc
clear all
cg =[0.86 0 0 0.6];
Pg = [0 0 0 318];
Pd = [50 170 200 80];
Qd = [30.9 105.35 123.94 49.58];
Y = [9.934-1i*44.925, -3.815+1i*19.078, -5.169+1i*25.847, 0
-3.815+1i*19.078, 8.984 – 1i*44.925, 0, -5.169+1i*25.847
-5.169+1i*25.847, 0, 8.192 – 1i*40.965, -3.023 + 1i*15.118
0, -5.169+1i*25.847, -3.023 + 1i*15.118, 8.192 – 1i*40.965];
Pg=sdpvar(1,4);
Qg = sdpvar(1,4);
objective= sum(cg.*Qg)
Qgmin=[-100 0 0 -100];
Qgmax =[100 0 0 100];
Pgmin =[0 0 0 0];
Pgmax =[318 0 0 318];
vang = sdpvar(1,4);
vmag = sdpvar(1,4);
vmin =0.9;
vmax =1.1
Constraints = [];
[Costraints,Pg(1,1)-Pd(1,1)==vmag(1,1)*[vmag(1,1)*Ymag(1,1)*cos(Yang(1,1))+…
vmag(1,2)*Ymag(2,1)*cos(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*cos(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*cos(Yang(4,1) + vang(1,1) – vang(4))];
[Costraints,Qg(1,1)-Qd(1,1)==(-vmag)(1,1)*[vmag(1,1)*Ymag(1,1)*sin(Yang(1,1))+…
vmag(1,2)*Ymag(2,1)*sin(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*sin(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*sin(Yang(4,1) + vang(1,1) – vang(4))];
% Constraints = [Constraints,sum(Pg)==sum(Pd)];
% Constraints=[Constraints,Pg(i)-Pd(i)=P(i)]
% Constraints=[Constraints,Qg(i)-Qd(i)=Q(i)]
Constraints = [Constraints,0<=Pg<=318];
Constraints = [Constraints,-100<=Qg<=100];
Constraints = [Constraints, vmin <= vmag];
Constraints = [Constraints, vmag <= vmax];
options = sdpsettings(‘solver’,’gurobi’);
sol = optimize(Constraints,objective,options);
value(objective)
reactive_power=value(Qg)
active_power=value(Pg)
voltage_mag=value(vmag)
voltage_ang=value(vang)clc
clear all
cg =[0.86 0 0 0.6];
Pg = [0 0 0 318];
Pd = [50 170 200 80];
Qd = [30.9 105.35 123.94 49.58];
Y = [9.934-1i*44.925, -3.815+1i*19.078, -5.169+1i*25.847, 0
-3.815+1i*19.078, 8.984 – 1i*44.925, 0, -5.169+1i*25.847
-5.169+1i*25.847, 0, 8.192 – 1i*40.965, -3.023 + 1i*15.118
0, -5.169+1i*25.847, -3.023 + 1i*15.118, 8.192 – 1i*40.965];
Pg=sdpvar(1,4);
Qg = sdpvar(1,4);
objective= sum(cg.*Qg)
Qgmin=[-100 0 0 -100];
Qgmax =[100 0 0 100];
Pgmin =[0 0 0 0];
Pgmax =[318 0 0 318];
vang = sdpvar(1,4);
vmag = sdpvar(1,4);
vmin =0.9;
vmax =1.1
Constraints = [];
[Costraints,Pg(1,1)-Pd(1,1)==vmag(1,1)*[vmag(1,1)*Ymag(1,1)*cos(Yang(1,1))+…
vmag(1,2)*Ymag(2,1)*cos(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*cos(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*cos(Yang(4,1) + vang(1,1) – vang(4))];
[Costraints,Qg(1,1)-Qd(1,1)==(-vmag)(1,1)*[vmag(1,1)*Ymag(1,1)*sin(Yang(1,1))+…
vmag(1,2)*Ymag(2,1)*sin(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*sin(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*sin(Yang(4,1) + vang(1,1) – vang(4))];
% Constraints = [Constraints,sum(Pg)==sum(Pd)];
% Constraints=[Constraints,Pg(i)-Pd(i)=P(i)]
% Constraints=[Constraints,Qg(i)-Qd(i)=Q(i)]
Constraints = [Constraints,0<=Pg<=318];
Constraints = [Constraints,-100<=Qg<=100];
Constraints = [Constraints, vmin <= vmag];
Constraints = [Constraints, vmag <= vmax];
options = sdpsettings(‘solver’,’gurobi’);
sol = optimize(Constraints,objective,options);
value(objective)
reactive_power=value(Qg)
active_power=value(Pg)
voltage_mag=value(vmag)
voltage_ang=value(vang) clc
clear all
cg =[0.86 0 0 0.6];
Pg = [0 0 0 318];
Pd = [50 170 200 80];
Qd = [30.9 105.35 123.94 49.58];
Y = [9.934-1i*44.925, -3.815+1i*19.078, -5.169+1i*25.847, 0
-3.815+1i*19.078, 8.984 – 1i*44.925, 0, -5.169+1i*25.847
-5.169+1i*25.847, 0, 8.192 – 1i*40.965, -3.023 + 1i*15.118
0, -5.169+1i*25.847, -3.023 + 1i*15.118, 8.192 – 1i*40.965];
Pg=sdpvar(1,4);
Qg = sdpvar(1,4);
objective= sum(cg.*Qg)
Qgmin=[-100 0 0 -100];
Qgmax =[100 0 0 100];
Pgmin =[0 0 0 0];
Pgmax =[318 0 0 318];
vang = sdpvar(1,4);
vmag = sdpvar(1,4);
vmin =0.9;
vmax =1.1
Constraints = [];
[Costraints,Pg(1,1)-Pd(1,1)==vmag(1,1)*[vmag(1,1)*Ymag(1,1)*cos(Yang(1,1))+…
vmag(1,2)*Ymag(2,1)*cos(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*cos(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*cos(Yang(4,1) + vang(1,1) – vang(4))];
[Costraints,Qg(1,1)-Qd(1,1)==(-vmag)(1,1)*[vmag(1,1)*Ymag(1,1)*sin(Yang(1,1))+…
vmag(1,2)*Ymag(2,1)*sin(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*sin(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*sin(Yang(4,1) + vang(1,1) – vang(4))];
% Constraints = [Constraints,sum(Pg)==sum(Pd)];
% Constraints=[Constraints,Pg(i)-Pd(i)=P(i)]
% Constraints=[Constraints,Qg(i)-Qd(i)=Q(i)]
Constraints = [Constraints,0<=Pg<=318];
Constraints = [Constraints,-100<=Qg<=100];
Constraints = [Constraints, vmin <= vmag];
Constraints = [Constraints, vmag <= vmax];
options = sdpsettings(‘solver’,’gurobi’);
sol = optimize(Constraints,objective,options);
value(objective)
reactive_power=value(Qg)
active_power=value(Pg)
voltage_mag=value(vmag)
voltage_ang=value(vang) optimization cost of reactive power MATLAB Answers — New Questions
Powershell Profiles
Hi! I would like to create profiles for powershell that on launch run commands like ssh to autoconnect to server. I tried making powershell profiles in window but besides of just existing it hasn’t changed anything. When using command New-Item -Path $profile.CurrentUserCurrentHost -ItemType File -Force
It is making profile used by whole powershell. How can i change that so profile for ex. HPServer launches different commands and RPIServer other?
Hi! I would like to create profiles for powershell that on launch run commands like ssh to autoconnect to server. I tried making powershell profiles in window but besides of just existing it hasn’t changed anything. When using command New-Item -Path $profile.CurrentUserCurrentHost -ItemType File -ForceIt is making profile used by whole powershell. How can i change that so profile for ex. HPServer launches different commands and RPIServer other? Read More
Vinesh Phogaat hi hai kya be kar rahe
Ted and I will be in touch with you and your family members
Ted and I will be in touch with you and your family members Read More
Working with a list, but I keep getting errors when updating
Hello!
I’m getting this message in Hebrew (translated to English here):
“The source of the list must be a delimited list or a reference to a single line.”.
“על מקור הרשימה להיות רשימה מופרדת או הפניה לשורה יחידה”
And all I need to do is to update this list, which exists on another page.
I updated it with one value, but the list itself wasn’t updated (I tried to recreate it also, but it didn’t let me, with the same error as above).
I need help about how to update it! And/or how to use as new list in the main sheet.
Please answer,
Thanks for the helpers!
Hello!I’m getting this message in Hebrew (translated to English here):”The source of the list must be a delimited list or a reference to a single line.”.”על מקור הרשימה להיות רשימה מופרדת או הפניה לשורה יחידה”And all I need to do is to update this list, which exists on another page.I updated it with one value, but the list itself wasn’t updated (I tried to recreate it also, but it didn’t let me, with the same error as above).I need help about how to update it! And/or how to use as new list in the main sheet. Please answer,Thanks for the helpers! Read More
Excel Copilot examples for the week of August 12th
The Excel team is happy to share some examples of how Excel Copilot can help you. Here’s what you can look forward to this week:
Monday 12-Aug – Using Excel Copilot to split columns
Tuesday, 13-Aug – Adding email addresses using Excel Copilot (coming soon)
Wednesday, 14-Aug – Working with date columns using Excel Copilot (coming soon)
Thursday, 15-Aug – Converting text to numbers with Excel Copilot (coming soon)
Friday. 16-Aug – Using Excel Copilot to show additional units of measure (coming soon)
Stay tuned,
Microsoft Excel Team
The Excel team is happy to share some examples of how Excel Copilot can help you. Here’s what you can look forward to this week:
Monday 12-Aug – Using Excel Copilot to split columns
Tuesday, 13-Aug – Adding email addresses using Excel Copilot (coming soon)
Wednesday, 14-Aug – Working with date columns using Excel Copilot (coming soon)
Thursday, 15-Aug – Converting text to numbers with Excel Copilot (coming soon)
Friday. 16-Aug – Using Excel Copilot to show additional units of measure (coming soon)
Stay tuned,
Microsoft Excel Team Read More
What’s New in Microsoft EDU webinar – August 2024
Here is our August 2024 webinar agenda:
Copilot for M365 announcements for educators and students
Teams for EDU updates – AI for educators feature rollout and more
Learning Accelerators updates
Reading Coach and Reflect
Clipchamp for EDU rollout
AMA – Ask Microsoft EDU Anything (Q&A)
How to sign up
OPTION 1: August 21st, Wednesday @ 8:00am Pacific Time Register here
OPTION 2: August 21st, Wednesday @ 4:00pm Pacific Time Register here
This is what the webinar portal will look like when you register:
Microsoft Tech Community – Latest Blogs –Read More
With Simulink Embedded Coder is it possible to change base workspace variables?
Hi all,
We are developing a standalone application for an inverter using MATLAB/Simulink R2022b with Embedded Coder and TIs package for C2000 development. Our target is TIs Launchpad XL based on the F28379D CPU. My goal is to write a Simulink model that can modify onboard flash during runtime, so when power is lost certain calibration values are maintained.
My model currently implements a Simulink reference example: https://nl.mathworks.com/matlabcentral/fileexchange/92788-simulink-reference-application-examples-for-ti-c2000?s_tid=FX_rc1_behav
This works well, but has a major downside: it is only possible to modify the variables in the matlab workspace and then press Ctrl+d to update them on the target machine while connected in external mode over a serial connection. For our devices in the field, we want to get rid of the mandatory external mode and achieve the same over CAN bus.
I have already tried a bunch of things, but none of them yield the desired behavior:
set_param(): will not work as the calibration values are stored in the MATLAB base workspace. I am not changing blocks.
assignin(): gives the following error: The function <function_name> is not supported for code generation. Declaring the function as extrinsic via coder.extrinsic does not solve the problem.
Parameter Writer block: In R2022b this can only modify variables in the model workspace, so I moved the flash related parameters accordingly. However, somehow the parameter writer block just won’t find them. My guess is that it is because the parameters are defined in the base workspace as a specific storage class based on the tic2000demospkg.Parameter. In the Code Mappings interface they therefore show up as ‘External Parameter Objects’ instead of ‘Model Parameters.’ Based on this article: https://blogs.mathworks.com/simulink/2023/09/27/signals-vs-parameters-in-simulink-and-the-parameter-writer-block/
MATLAB function block: I was hoping the parameters I defined in the base workspace could be called in a global context. Calling the matlab routine from Simulink showed me this is unfortunately not the case. Implicitly the variable was defined in local context and base variable remained unchanged. Inspecting gave clarity on this.
For a fact I know that the variables that I want to tune are defined with the mp_ prefix because I configured the identifier for the custom storage class. However, I don’t understand on how I want to change these.
Is it at all possible to modify variables? Can someone give me a heads up on how?
Thanks a lot in advance!
Kind regards,
RemiHi all,
We are developing a standalone application for an inverter using MATLAB/Simulink R2022b with Embedded Coder and TIs package for C2000 development. Our target is TIs Launchpad XL based on the F28379D CPU. My goal is to write a Simulink model that can modify onboard flash during runtime, so when power is lost certain calibration values are maintained.
My model currently implements a Simulink reference example: https://nl.mathworks.com/matlabcentral/fileexchange/92788-simulink-reference-application-examples-for-ti-c2000?s_tid=FX_rc1_behav
This works well, but has a major downside: it is only possible to modify the variables in the matlab workspace and then press Ctrl+d to update them on the target machine while connected in external mode over a serial connection. For our devices in the field, we want to get rid of the mandatory external mode and achieve the same over CAN bus.
I have already tried a bunch of things, but none of them yield the desired behavior:
set_param(): will not work as the calibration values are stored in the MATLAB base workspace. I am not changing blocks.
assignin(): gives the following error: The function <function_name> is not supported for code generation. Declaring the function as extrinsic via coder.extrinsic does not solve the problem.
Parameter Writer block: In R2022b this can only modify variables in the model workspace, so I moved the flash related parameters accordingly. However, somehow the parameter writer block just won’t find them. My guess is that it is because the parameters are defined in the base workspace as a specific storage class based on the tic2000demospkg.Parameter. In the Code Mappings interface they therefore show up as ‘External Parameter Objects’ instead of ‘Model Parameters.’ Based on this article: https://blogs.mathworks.com/simulink/2023/09/27/signals-vs-parameters-in-simulink-and-the-parameter-writer-block/
MATLAB function block: I was hoping the parameters I defined in the base workspace could be called in a global context. Calling the matlab routine from Simulink showed me this is unfortunately not the case. Implicitly the variable was defined in local context and base variable remained unchanged. Inspecting gave clarity on this.
For a fact I know that the variables that I want to tune are defined with the mp_ prefix because I configured the identifier for the custom storage class. However, I don’t understand on how I want to change these.
Is it at all possible to modify variables? Can someone give me a heads up on how?
Thanks a lot in advance!
Kind regards,
Remi Hi all,
We are developing a standalone application for an inverter using MATLAB/Simulink R2022b with Embedded Coder and TIs package for C2000 development. Our target is TIs Launchpad XL based on the F28379D CPU. My goal is to write a Simulink model that can modify onboard flash during runtime, so when power is lost certain calibration values are maintained.
My model currently implements a Simulink reference example: https://nl.mathworks.com/matlabcentral/fileexchange/92788-simulink-reference-application-examples-for-ti-c2000?s_tid=FX_rc1_behav
This works well, but has a major downside: it is only possible to modify the variables in the matlab workspace and then press Ctrl+d to update them on the target machine while connected in external mode over a serial connection. For our devices in the field, we want to get rid of the mandatory external mode and achieve the same over CAN bus.
I have already tried a bunch of things, but none of them yield the desired behavior:
set_param(): will not work as the calibration values are stored in the MATLAB base workspace. I am not changing blocks.
assignin(): gives the following error: The function <function_name> is not supported for code generation. Declaring the function as extrinsic via coder.extrinsic does not solve the problem.
Parameter Writer block: In R2022b this can only modify variables in the model workspace, so I moved the flash related parameters accordingly. However, somehow the parameter writer block just won’t find them. My guess is that it is because the parameters are defined in the base workspace as a specific storage class based on the tic2000demospkg.Parameter. In the Code Mappings interface they therefore show up as ‘External Parameter Objects’ instead of ‘Model Parameters.’ Based on this article: https://blogs.mathworks.com/simulink/2023/09/27/signals-vs-parameters-in-simulink-and-the-parameter-writer-block/
MATLAB function block: I was hoping the parameters I defined in the base workspace could be called in a global context. Calling the matlab routine from Simulink showed me this is unfortunately not the case. Implicitly the variable was defined in local context and base variable remained unchanged. Inspecting gave clarity on this.
For a fact I know that the variables that I want to tune are defined with the mp_ prefix because I configured the identifier for the custom storage class. However, I don’t understand on how I want to change these.
Is it at all possible to modify variables? Can someone give me a heads up on how?
Thanks a lot in advance!
Kind regards,
Remi ti, embedded coder, simulink, variables, code generation, matlab code MATLAB Answers — New Questions
How to keep the order in plotting scatter plot with categorical variables
Hi,
I am using scatter (b,a) where a is categorical variable and b is double. The plot shows a different order than in my list in a. How do I keep the same order in the plot?Hi,
I am using scatter (b,a) where a is categorical variable and b is double. The plot shows a different order than in my list in a. How do I keep the same order in the plot? Hi,
I am using scatter (b,a) where a is categorical variable and b is double. The plot shows a different order than in my list in a. How do I keep the same order in the plot? scatter, plot, categorical MATLAB Answers — New Questions
Why do I get the error “Unable to resolve the name com.mathworks.toolbox.distcomp.ui.widget.SupportedDataTypes.STRING” when running configCluster?
Why do I get the error "Unable to resolve the name com.mathworks.toolbox.distcomp.ui.widget.SupportedDataTypes.STRING" when running configCluster?Why do I get the error "Unable to resolve the name com.mathworks.toolbox.distcomp.ui.widget.SupportedDataTypes.STRING" when running configCluster? Why do I get the error "Unable to resolve the name com.mathworks.toolbox.distcomp.ui.widget.SupportedDataTypes.STRING" when running configCluster? MATLAB Answers — New Questions
Using the trigonometric Fourier series to develop MATLAB code to confirm correctness
fs = 2/5 + sum(2/(n*pi)*sin(2*pi/5*n)*cos(2*pi/5*n*t))
x(t) = sum(rect((t-5*n)/2))
I really don’t know how to plot two function. Please help me.fs = 2/5 + sum(2/(n*pi)*sin(2*pi/5*n)*cos(2*pi/5*n*t))
x(t) = sum(rect((t-5*n)/2))
I really don’t know how to plot two function. Please help me. fs = 2/5 + sum(2/(n*pi)*sin(2*pi/5*n)*cos(2*pi/5*n*t))
x(t) = sum(rect((t-5*n)/2))
I really don’t know how to plot two function. Please help me. trigonometric fourier series MATLAB Answers — New Questions
Status reports intune
I am using the API “deviceManagement/reports/getUserInstallStatusReport” with the HTTP POST method, and the request body includes:
Intune returns a maximum of 50 records, but some applications are installed by more than 5000 users. To check if a specific user has installed this application and to get the installation status report for this application on their device, I have to loop through the results by incrementing the skip value by 50. This process takes a lot of time and often results in a 429 status (Too Many Requests).
Is there any way to filter by UserName directly? Currently, this doesn’t seem to be supported.
I am using the API “deviceManagement/reports/getUserInstallStatusReport” with the HTTP POST method, and the request body includes: { “select”: [ “UserName”, “UserPrincipalName”, “FailedCount”, “InstalledCount”, “PendingInstallCount”, “NotInstalledCount” ], “skip”: 0, “top”: 50, “filter”: “(ApplicationId eq ‘XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX’)” } Intune returns a maximum of 50 records, but some applications are installed by more than 5000 users. To check if a specific user has installed this application and to get the installation status report for this application on their device, I have to loop through the results by incrementing the skip value by 50. This process takes a lot of time and often results in a 429 status (Too Many Requests).Is there any way to filter by UserName directly? Currently, this doesn’t seem to be supported. Read More