Category: Matlab
Category Archives: Matlab
I saw R2025b update2 on the download page , but can’t receive it in the software notification? Even when I manually check for it.
I saw R2025b update2 on the download page
but can’t receive it in the software notification
Is there anything wrong?I saw R2025b update2 on the download page
but can’t receive it in the software notification
Is there anything wrong? I saw R2025b update2 on the download page
but can’t receive it in the software notification
Is there anything wrong? update2 MATLAB Answers — New Questions
Friends, how to distribute the torque of four motors on VCU, is there any learning material for this?
Friends, how to distribute the torque of four motors on VCU, is there any learning material for this?Friends, how to distribute the torque of four motors on VCU, is there any learning material for this? Friends, how to distribute the torque of four motors on VCU, is there any learning material for this? four motor MATLAB Answers — New Questions
convolution integral with ode45
Hi guys, can someone help me solve this equation of motion using ode45 or any other way? I dont know how to approach the convolution integral. Thank you!Hi guys, can someone help me solve this equation of motion using ode45 or any other way? I dont know how to approach the convolution integral. Thank you! Hi guys, can someone help me solve this equation of motion using ode45 or any other way? I dont know how to approach the convolution integral. Thank you! convolution, ode45, sdof, damped eom MATLAB Answers — New Questions
How to find the real roots and index root?
syms x m y M %H R_c R_a p R
%—————————————————
%Initilization
%—————————————————
U=zeros(1,’sym’);
A=zeros(1,’sym’);
B=zeros(1,’sym’);
C=zeros(1,’sym’);
D=zeros(1,’sym’);
E=zeros(1,’sym’);
F=zeros(1,’sym’);
series(x)=sym(zeros(1,1));
%—————————————————
%Parameters
%—————————————————
l=0.5;
%M=0.5;
H=0.5;
R_c=0.5;
R_a=0.25;
p=0.8;
R=0.25
%—————————————————
%Initial condition
%—————————————————
U(1)=y
U(2)=0
for i=1:14
U(i+2)=m;
A(1)=0;
B(1)=0;
C(1)=0;
for j=1:i
A(1)=A(1)+U(j)*(i-j+1)*(i-j+2)*U(i-j+3);
B(1)=B(1)+j*U(j+1)*(i-j+1)*U(i-j+2);
C(1)=C(1)+U(j)*U(i-j+1);
end
variable_m=(1+4*R_c)*i*(i+1)*U(i+2)+l*A(1)+l*B(1)-R_a*C(1)-M*(1-p)*U(i)-H*U(i)-R*U(i);
variable=solve(variable_m,m);
U(i+2)=variable;
end
for k=1:6
series(x)=simplify(series(x)+U(k)*(power(x,k-1)));
end
series
e1=subs(series,x,1);
e2=e1-1
root=solve(e2,y)
var2 = vpa(root)
%%%%%%%%%%%%%%%%%%%%%%%%HOW TO FIND THE REAL ROOT %%%%%%%%%%%%%%%%%%%
series_M=subs(series, y,root(1))
Fin_efficiency=int(series_M,x,0,1)
var = vpa(Fin_efficiency)
M=0:5
row=0;
eta=zeros(length(M))
for i=1:length(M)
row=row+1
eta(row)=var(M(row))
end
plot(M,eta)
%—————————————————————————————–
the following error apper where the error remaining
Array indices must be positive integers or logical values.
Error in indexing (line 936)
R_tilde = builtin(‘subsref’,L_tilde,Idx);
But the indices are positivesyms x m y M %H R_c R_a p R
%—————————————————
%Initilization
%—————————————————
U=zeros(1,’sym’);
A=zeros(1,’sym’);
B=zeros(1,’sym’);
C=zeros(1,’sym’);
D=zeros(1,’sym’);
E=zeros(1,’sym’);
F=zeros(1,’sym’);
series(x)=sym(zeros(1,1));
%—————————————————
%Parameters
%—————————————————
l=0.5;
%M=0.5;
H=0.5;
R_c=0.5;
R_a=0.25;
p=0.8;
R=0.25
%—————————————————
%Initial condition
%—————————————————
U(1)=y
U(2)=0
for i=1:14
U(i+2)=m;
A(1)=0;
B(1)=0;
C(1)=0;
for j=1:i
A(1)=A(1)+U(j)*(i-j+1)*(i-j+2)*U(i-j+3);
B(1)=B(1)+j*U(j+1)*(i-j+1)*U(i-j+2);
C(1)=C(1)+U(j)*U(i-j+1);
end
variable_m=(1+4*R_c)*i*(i+1)*U(i+2)+l*A(1)+l*B(1)-R_a*C(1)-M*(1-p)*U(i)-H*U(i)-R*U(i);
variable=solve(variable_m,m);
U(i+2)=variable;
end
for k=1:6
series(x)=simplify(series(x)+U(k)*(power(x,k-1)));
end
series
e1=subs(series,x,1);
e2=e1-1
root=solve(e2,y)
var2 = vpa(root)
%%%%%%%%%%%%%%%%%%%%%%%%HOW TO FIND THE REAL ROOT %%%%%%%%%%%%%%%%%%%
series_M=subs(series, y,root(1))
Fin_efficiency=int(series_M,x,0,1)
var = vpa(Fin_efficiency)
M=0:5
row=0;
eta=zeros(length(M))
for i=1:length(M)
row=row+1
eta(row)=var(M(row))
end
plot(M,eta)
%—————————————————————————————–
the following error apper where the error remaining
Array indices must be positive integers or logical values.
Error in indexing (line 936)
R_tilde = builtin(‘subsref’,L_tilde,Idx);
But the indices are positive syms x m y M %H R_c R_a p R
%—————————————————
%Initilization
%—————————————————
U=zeros(1,’sym’);
A=zeros(1,’sym’);
B=zeros(1,’sym’);
C=zeros(1,’sym’);
D=zeros(1,’sym’);
E=zeros(1,’sym’);
F=zeros(1,’sym’);
series(x)=sym(zeros(1,1));
%—————————————————
%Parameters
%—————————————————
l=0.5;
%M=0.5;
H=0.5;
R_c=0.5;
R_a=0.25;
p=0.8;
R=0.25
%—————————————————
%Initial condition
%—————————————————
U(1)=y
U(2)=0
for i=1:14
U(i+2)=m;
A(1)=0;
B(1)=0;
C(1)=0;
for j=1:i
A(1)=A(1)+U(j)*(i-j+1)*(i-j+2)*U(i-j+3);
B(1)=B(1)+j*U(j+1)*(i-j+1)*U(i-j+2);
C(1)=C(1)+U(j)*U(i-j+1);
end
variable_m=(1+4*R_c)*i*(i+1)*U(i+2)+l*A(1)+l*B(1)-R_a*C(1)-M*(1-p)*U(i)-H*U(i)-R*U(i);
variable=solve(variable_m,m);
U(i+2)=variable;
end
for k=1:6
series(x)=simplify(series(x)+U(k)*(power(x,k-1)));
end
series
e1=subs(series,x,1);
e2=e1-1
root=solve(e2,y)
var2 = vpa(root)
%%%%%%%%%%%%%%%%%%%%%%%%HOW TO FIND THE REAL ROOT %%%%%%%%%%%%%%%%%%%
series_M=subs(series, y,root(1))
Fin_efficiency=int(series_M,x,0,1)
var = vpa(Fin_efficiency)
M=0:5
row=0;
eta=zeros(length(M))
for i=1:length(M)
row=row+1
eta(row)=var(M(row))
end
plot(M,eta)
%—————————————————————————————–
the following error apper where the error remaining
Array indices must be positive integers or logical values.
Error in indexing (line 936)
R_tilde = builtin(‘subsref’,L_tilde,Idx);
But the indices are positive root and index issue MATLAB Answers — New Questions
Delay balancing failed when generating HDL code
The problem module identified in the report is the low-pass filter module shown in Figure 1.Can anyone solve this?The problem module identified in the report is the low-pass filter module shown in Figure 1.Can anyone solve this? The problem module identified in the report is the low-pass filter module shown in Figure 1.Can anyone solve this? hdl, delay MATLAB Answers — New Questions
MATLAB 2025a and 2025b crashed
matlab2025a和2025b在程序运行过程中出现闪退,并弹出下面这个窗口。而后我在打开matlab的时候也是刚打开就闪退,出现下面这个窗口,应该怎么解决呀?电脑重启之后有时候正常,有时候也不行,得重启好几次才行。
Matlab 2025a and 2025b experienced crashes during program execution and a window like the following popped up. Then, when I opened Matlab, it crashed immediately upon opening, and a similar window appeared. How can this be resolved? After restarting the computer, sometimes it works normally, but other times it doesn’t. It requires multiple restarts to make it work.matlab2025a和2025b在程序运行过程中出现闪退,并弹出下面这个窗口。而后我在打开matlab的时候也是刚打开就闪退,出现下面这个窗口,应该怎么解决呀?电脑重启之后有时候正常,有时候也不行,得重启好几次才行。
Matlab 2025a and 2025b experienced crashes during program execution and a window like the following popped up. Then, when I opened Matlab, it crashed immediately upon opening, and a similar window appeared. How can this be resolved? After restarting the computer, sometimes it works normally, but other times it doesn’t. It requires multiple restarts to make it work. matlab2025a和2025b在程序运行过程中出现闪退,并弹出下面这个窗口。而后我在打开matlab的时候也是刚打开就闪退,出现下面这个窗口,应该怎么解决呀?电脑重启之后有时候正常,有时候也不行,得重启好几次才行。
Matlab 2025a and 2025b experienced crashes during program execution and a window like the following popped up. Then, when I opened Matlab, it crashed immediately upon opening, and a similar window appeared. How can this be resolved? After restarting the computer, sometimes it works normally, but other times it doesn’t. It requires multiple restarts to make it work. matlab 闪退 MATLAB Answers — New Questions
How to start a simulation in steady-state ?
Hi everyone,
I have a question regarding how to the start of a simulation in simulink with the steady state signal (voltage in my case) from t=0s.
I have done the power flow initialization as well the steady-state initial state with the help of powergui but I still have a oscillating voltage, power output from the synchronous machine.
Do you have any idea how to get read of this transient ? For instance I’d like to start my simulation at t=0s with the state of t=0.6s
Thanks in advance !
AntoineHi everyone,
I have a question regarding how to the start of a simulation in simulink with the steady state signal (voltage in my case) from t=0s.
I have done the power flow initialization as well the steady-state initial state with the help of powergui but I still have a oscillating voltage, power output from the synchronous machine.
Do you have any idea how to get read of this transient ? For instance I’d like to start my simulation at t=0s with the state of t=0.6s
Thanks in advance !
Antoine Hi everyone,
I have a question regarding how to the start of a simulation in simulink with the steady state signal (voltage in my case) from t=0s.
I have done the power flow initialization as well the steady-state initial state with the help of powergui but I still have a oscillating voltage, power output from the synchronous machine.
Do you have any idea how to get read of this transient ? For instance I’d like to start my simulation at t=0s with the state of t=0.6s
Thanks in advance !
Antoine initialization, steady-state MATLAB Answers — New Questions
Why is event PreUpdate and PostUpdate not triggered in ChartContainer?
Hi all,
I’ve created a ChartContainer in MATLAB R2024b and need to track when its update routine finishes so I can restore an internal property to its original value. During setup, I added listeners for the PreUpdate and PostUpdate events of the ChartContainer.
However, when I change a property, the update method runs, but neither the PreUpdate nor PostUpdate events seem to fire.
Below I share the class implementation:
classdef TestComponent < matlab.graphics.chartcontainer.ChartContainer
%% Properties
properties (AbortSet)
% Internal use. Indicates update is required, triggered by external
% property.
TriggerUpdate (1,1) logical = false;
end %properties
properties (Transient, NonCopyable, Hidden, SetAccess = protected, UsedInUpdate = false)
% Event listener array
EventListeners (1,:) event.listener
end
%% Protected Methods
methods (Access = protected)
function setup(obj)
% Setup routine
% Show setup routine is executed
disp(‘setup’)
% Setup listeners to all events in the class
metaClass = meta.class.fromName(class(obj));
eventList = {metaClass.EventList.Name};
listenAcces = {metaClass.EventList.ListenAccess};
% Initialize listener to post-update event
for idx = 1:numel(eventList)
if ~strcmpi(listenAcces{idx}, {‘public’, ‘protected’})
continue
end
obj.EventListeners(end+1) = listener(obj, …
eventList{idx}, @(s,e) obj.showEvent(e));
end
end %function
function update(obj)
% Update routine
% Show update routine is executed
disp(‘update’)
end %function
end %methods
methods
function showEvent(obj, e)
disp(e)
end %function
end %methods
end
Does anyone know why these events aren’t triggered? For ComponentContainer, the events work as expected.Hi all,
I’ve created a ChartContainer in MATLAB R2024b and need to track when its update routine finishes so I can restore an internal property to its original value. During setup, I added listeners for the PreUpdate and PostUpdate events of the ChartContainer.
However, when I change a property, the update method runs, but neither the PreUpdate nor PostUpdate events seem to fire.
Below I share the class implementation:
classdef TestComponent < matlab.graphics.chartcontainer.ChartContainer
%% Properties
properties (AbortSet)
% Internal use. Indicates update is required, triggered by external
% property.
TriggerUpdate (1,1) logical = false;
end %properties
properties (Transient, NonCopyable, Hidden, SetAccess = protected, UsedInUpdate = false)
% Event listener array
EventListeners (1,:) event.listener
end
%% Protected Methods
methods (Access = protected)
function setup(obj)
% Setup routine
% Show setup routine is executed
disp(‘setup’)
% Setup listeners to all events in the class
metaClass = meta.class.fromName(class(obj));
eventList = {metaClass.EventList.Name};
listenAcces = {metaClass.EventList.ListenAccess};
% Initialize listener to post-update event
for idx = 1:numel(eventList)
if ~strcmpi(listenAcces{idx}, {‘public’, ‘protected’})
continue
end
obj.EventListeners(end+1) = listener(obj, …
eventList{idx}, @(s,e) obj.showEvent(e));
end
end %function
function update(obj)
% Update routine
% Show update routine is executed
disp(‘update’)
end %function
end %methods
methods
function showEvent(obj, e)
disp(e)
end %function
end %methods
end
Does anyone know why these events aren’t triggered? For ComponentContainer, the events work as expected. Hi all,
I’ve created a ChartContainer in MATLAB R2024b and need to track when its update routine finishes so I can restore an internal property to its original value. During setup, I added listeners for the PreUpdate and PostUpdate events of the ChartContainer.
However, when I change a property, the update method runs, but neither the PreUpdate nor PostUpdate events seem to fire.
Below I share the class implementation:
classdef TestComponent < matlab.graphics.chartcontainer.ChartContainer
%% Properties
properties (AbortSet)
% Internal use. Indicates update is required, triggered by external
% property.
TriggerUpdate (1,1) logical = false;
end %properties
properties (Transient, NonCopyable, Hidden, SetAccess = protected, UsedInUpdate = false)
% Event listener array
EventListeners (1,:) event.listener
end
%% Protected Methods
methods (Access = protected)
function setup(obj)
% Setup routine
% Show setup routine is executed
disp(‘setup’)
% Setup listeners to all events in the class
metaClass = meta.class.fromName(class(obj));
eventList = {metaClass.EventList.Name};
listenAcces = {metaClass.EventList.ListenAccess};
% Initialize listener to post-update event
for idx = 1:numel(eventList)
if ~strcmpi(listenAcces{idx}, {‘public’, ‘protected’})
continue
end
obj.EventListeners(end+1) = listener(obj, …
eventList{idx}, @(s,e) obj.showEvent(e));
end
end %function
function update(obj)
% Update routine
% Show update routine is executed
disp(‘update’)
end %function
end %methods
methods
function showEvent(obj, e)
disp(e)
end %function
end %methods
end
Does anyone know why these events aren’t triggered? For ComponentContainer, the events work as expected. matlab, plot, chartcontainer, update, event MATLAB Answers — New Questions
Forrtl: severe (38): error during write, unit -1 file CONOUT$
I created the model in 2020. It was compiled and ran successfully. I was able to compile this model successfully with MATLAB 2024b and 2025a but error occured during runtime.I created the model in 2020. It was compiled and ran successfully. I was able to compile this model successfully with MATLAB 2024b and 2025a but error occured during runtime. I created the model in 2020. It was compiled and ran successfully. I was able to compile this model successfully with MATLAB 2024b and 2025a but error occured during runtime. traj MATLAB Answers — New Questions
FPGA Data Capture in Custom Board
I have a custom cyclone v soc board. I’m trying to follow along with debug IP core using FPGA Data Capture. https://www.mathworks.com/help/hdlcoder/ug/debug-ip-core-using-fpga-data-capture.html . The FPGA Data Capture interface does not appear for me as shown in step 1.2 of HDL Workflow Advisor. How do I add this interface to my custom reference design. Will HDL Workflow Advisor automatically add the appropriate IP core to the qsys project based on what signals I want to log?
I think part of the problem is I don’t have any FDC block in my library:
As you can see I do have the HDL Verifier Support Package for Intel Boards installed but there is no FPGA Data Capture block. I can not find it when searching for it either. Does this block exist in some other package or is there something wrong with my install?I have a custom cyclone v soc board. I’m trying to follow along with debug IP core using FPGA Data Capture. https://www.mathworks.com/help/hdlcoder/ug/debug-ip-core-using-fpga-data-capture.html . The FPGA Data Capture interface does not appear for me as shown in step 1.2 of HDL Workflow Advisor. How do I add this interface to my custom reference design. Will HDL Workflow Advisor automatically add the appropriate IP core to the qsys project based on what signals I want to log?
I think part of the problem is I don’t have any FDC block in my library:
As you can see I do have the HDL Verifier Support Package for Intel Boards installed but there is no FPGA Data Capture block. I can not find it when searching for it either. Does this block exist in some other package or is there something wrong with my install? I have a custom cyclone v soc board. I’m trying to follow along with debug IP core using FPGA Data Capture. https://www.mathworks.com/help/hdlcoder/ug/debug-ip-core-using-fpga-data-capture.html . The FPGA Data Capture interface does not appear for me as shown in step 1.2 of HDL Workflow Advisor. How do I add this interface to my custom reference design. Will HDL Workflow Advisor automatically add the appropriate IP core to the qsys project based on what signals I want to log?
I think part of the problem is I don’t have any FDC block in my library:
As you can see I do have the HDL Verifier Support Package for Intel Boards installed but there is no FPGA Data Capture block. I can not find it when searching for it either. Does this block exist in some other package or is there something wrong with my install? hdl verifier MATLAB Answers — New Questions
How to use “getkey” correct ?
I am currently using "getkey" but it appears to include some falts. The worst one is that it stops matlab and goes to the matlab main window, however the maylab script still runs, but it is hard to use without seeing the figure of my apllication.
What alternative functions can be used instead of "getkey" ?
best regards
OleI am currently using "getkey" but it appears to include some falts. The worst one is that it stops matlab and goes to the matlab main window, however the maylab script still runs, but it is hard to use without seeing the figure of my apllication.
What alternative functions can be used instead of "getkey" ?
best regards
Ole I am currently using "getkey" but it appears to include some falts. The worst one is that it stops matlab and goes to the matlab main window, however the maylab script still runs, but it is hard to use without seeing the figure of my apllication.
What alternative functions can be used instead of "getkey" ?
best regards
Ole reading keyboard MATLAB Answers — New Questions
how to add a constraint condition to fsolve?
Hi everyone,
These days I want to solve a system of nonlinear equations with matlab. In the equations, there are all four unkonwns, A(1),A(2),A(3)and A(4) to be solved but only three equations. therefore, the ‘levenberg-marquardt’ algorithm is applied to get the results. However, for physical meaning, an additional constraint is required, i.e. A(3)should be larger than zero. and with the ‘levenberg-marquardt’ algorithm, in the the obtained result, A(3) is negative.
Does anyone know how to add this constraint condition to fsolve ? Your help will be highly appreciated!Hi everyone,
These days I want to solve a system of nonlinear equations with matlab. In the equations, there are all four unkonwns, A(1),A(2),A(3)and A(4) to be solved but only three equations. therefore, the ‘levenberg-marquardt’ algorithm is applied to get the results. However, for physical meaning, an additional constraint is required, i.e. A(3)should be larger than zero. and with the ‘levenberg-marquardt’ algorithm, in the the obtained result, A(3) is negative.
Does anyone know how to add this constraint condition to fsolve ? Your help will be highly appreciated! Hi everyone,
These days I want to solve a system of nonlinear equations with matlab. In the equations, there are all four unkonwns, A(1),A(2),A(3)and A(4) to be solved but only three equations. therefore, the ‘levenberg-marquardt’ algorithm is applied to get the results. However, for physical meaning, an additional constraint is required, i.e. A(3)should be larger than zero. and with the ‘levenberg-marquardt’ algorithm, in the the obtained result, A(3) is negative.
Does anyone know how to add this constraint condition to fsolve ? Your help will be highly appreciated! fsolve MATLAB Answers — New Questions
How to control intermediate variables when Simulink generates C code, and how to control the index values and function names for 2D lookup tables.
Hello, I encountered some problems when using Simulink to generate C code. My model is shown in Figure 1, and the model optimization configuration is shown in Figure 2. I disabled signal storage reuse but disabled local output reuse; all other settings are default.
1、If I enable reusing local outputs, it will use a local variable multiple times, which makes the code less readable. Even if I disable reusing local module outputs, some local variables are still reused. I want to improve readability but don’t want each module to output individually. How can this be resolved?
2、How should I control the generation of intermediate variables? Do I need to name all module names and signal names? Is it possible to know in advance where intermediate variable names will be generated?
3、In Figure 3, the two-dimensional lookup table I used has the same dimensions, and when generating code it will generate a shared index value called ‘pooled.’ How should this variable be controlled?
4、Currently, the lookup functions I generate for the code are placed in model.c. Can the functions generated by the lookup module be placed in a specified file?
5、Is it possible to generate a structure to control the breakpoints and table data of the lookup module? I can do this using the Struct storage class in Simulink, but the lookup data ends up appearing in model.c, which makes my model.c look messy.
6、3. In Figure 4, there is matrix multiplication in the model. I have named the intermediate signal lines and the modules before and after, so why does it still generate a tmp variable? Is this variable used for the loop operation in matrix addition?
There are corresponding file attachments at the end.Hello, I encountered some problems when using Simulink to generate C code. My model is shown in Figure 1, and the model optimization configuration is shown in Figure 2. I disabled signal storage reuse but disabled local output reuse; all other settings are default.
1、If I enable reusing local outputs, it will use a local variable multiple times, which makes the code less readable. Even if I disable reusing local module outputs, some local variables are still reused. I want to improve readability but don’t want each module to output individually. How can this be resolved?
2、How should I control the generation of intermediate variables? Do I need to name all module names and signal names? Is it possible to know in advance where intermediate variable names will be generated?
3、In Figure 3, the two-dimensional lookup table I used has the same dimensions, and when generating code it will generate a shared index value called ‘pooled.’ How should this variable be controlled?
4、Currently, the lookup functions I generate for the code are placed in model.c. Can the functions generated by the lookup module be placed in a specified file?
5、Is it possible to generate a structure to control the breakpoints and table data of the lookup module? I can do this using the Struct storage class in Simulink, but the lookup data ends up appearing in model.c, which makes my model.c look messy.
6、3. In Figure 4, there is matrix multiplication in the model. I have named the intermediate signal lines and the modules before and after, so why does it still generate a tmp variable? Is this variable used for the loop operation in matrix addition?
There are corresponding file attachments at the end. Hello, I encountered some problems when using Simulink to generate C code. My model is shown in Figure 1, and the model optimization configuration is shown in Figure 2. I disabled signal storage reuse but disabled local output reuse; all other settings are default.
1、If I enable reusing local outputs, it will use a local variable multiple times, which makes the code less readable. Even if I disable reusing local module outputs, some local variables are still reused. I want to improve readability but don’t want each module to output individually. How can this be resolved?
2、How should I control the generation of intermediate variables? Do I need to name all module names and signal names? Is it possible to know in advance where intermediate variable names will be generated?
3、In Figure 3, the two-dimensional lookup table I used has the same dimensions, and when generating code it will generate a shared index value called ‘pooled.’ How should this variable be controlled?
4、Currently, the lookup functions I generate for the code are placed in model.c. Can the functions generated by the lookup module be placed in a specified file?
5、Is it possible to generate a structure to control the breakpoints and table data of the lookup module? I can do this using the Struct storage class in Simulink, but the lookup data ends up appearing in model.c, which makes my model.c look messy.
6、3. In Figure 4, there is matrix multiplication in the model. I have named the intermediate signal lines and the modules before and after, so why does it still generate a tmp variable? Is this variable used for the loop operation in matrix addition?
There are corresponding file attachments at the end. simulink, generate code, lookuptable, embedded coder MATLAB Answers — New Questions
Can MATLAB be installed on two computers? Or, how often can a matlab license be transferred between two computers?
Can MATLAB be installed on two computers? Or, how often can a license be transferred between two computers?
For "Home" license? For "Student" license?
For a student who needs MATLAB on two machines with often switch between the two.
What would be the right license – "Student" or "Home"
ThanksCan MATLAB be installed on two computers? Or, how often can a license be transferred between two computers?
For "Home" license? For "Student" license?
For a student who needs MATLAB on two machines with often switch between the two.
What would be the right license – "Student" or "Home"
Thanks Can MATLAB be installed on two computers? Or, how often can a license be transferred between two computers?
For "Home" license? For "Student" license?
For a student who needs MATLAB on two machines with often switch between the two.
What would be the right license – "Student" or "Home"
Thanks license transfer MATLAB Answers — New Questions
Error: 403X-ERR#MHOD HELP
I’m a student and I’ve been trying to access Matlab online, and I’m getting an error saying, "Access Denied," which says: 403X-ERR#MHOD. It worked fine on May 7th, but it’s not working this afternoon. Is there a solution? I need it to review my university classes.I’m a student and I’ve been trying to access Matlab online, and I’m getting an error saying, "Access Denied," which says: 403X-ERR#MHOD. It worked fine on May 7th, but it’s not working this afternoon. Is there a solution? I need it to review my university classes. I’m a student and I’ve been trying to access Matlab online, and I’m getting an error saying, "Access Denied," which says: 403X-ERR#MHOD. It worked fine on May 7th, but it’s not working this afternoon. Is there a solution? I need it to review my university classes. access MATLAB Answers — New Questions
What’s the best color model to extract texture features from?
Just like L*a*b is the best color model to extract color features from images because it matches human color perspective,what is the best color model to extract GLCM texture features from and whyJust like L*a*b is the best color model to extract color features from images because it matches human color perspective,what is the best color model to extract GLCM texture features from and why Just like L*a*b is the best color model to extract color features from images because it matches human color perspective,what is the best color model to extract GLCM texture features from and why color, texture, colormodel, image MATLAB Answers — New Questions
Check if two colors are similar
How can I compare two RGB colors to see if they look the same (to human eyes). And I’d like to be able to control the amount of similarity.
Say for example 15. What is the best way to compare the colors to have more colors in the range.
I have two idea in my mind but I don’t know if they are the best options:
% (colorN(1) to colorN(3) are the RGB value of the color)
% Method 1:
if abs(double(color1(1)) – double(color2(1))) < 15 …
&& abs(double(color1(2)) – double(color2(2))) < 15 …
&& abs(double(color1(3)) – double(color2(3))) < 15
% The colors are similar
end
% Method 2
if sum(abs(double(color1(1)) – double(color2(1))), …
abs(double(color1(2)) – double(color2(2))), …
abs(double(color1(3)) – double(color2(3)))) < 15
% The colors are similar
end
% Maybe method 3 which is a combination of the two.
I’ve tried these a little bit by myself but I wasn’t happy with the results. Anyone knows a better way to compare? Does Matlab have a function for that?How can I compare two RGB colors to see if they look the same (to human eyes). And I’d like to be able to control the amount of similarity.
Say for example 15. What is the best way to compare the colors to have more colors in the range.
I have two idea in my mind but I don’t know if they are the best options:
% (colorN(1) to colorN(3) are the RGB value of the color)
% Method 1:
if abs(double(color1(1)) – double(color2(1))) < 15 …
&& abs(double(color1(2)) – double(color2(2))) < 15 …
&& abs(double(color1(3)) – double(color2(3))) < 15
% The colors are similar
end
% Method 2
if sum(abs(double(color1(1)) – double(color2(1))), …
abs(double(color1(2)) – double(color2(2))), …
abs(double(color1(3)) – double(color2(3)))) < 15
% The colors are similar
end
% Maybe method 3 which is a combination of the two.
I’ve tried these a little bit by myself but I wasn’t happy with the results. Anyone knows a better way to compare? Does Matlab have a function for that? How can I compare two RGB colors to see if they look the same (to human eyes). And I’d like to be able to control the amount of similarity.
Say for example 15. What is the best way to compare the colors to have more colors in the range.
I have two idea in my mind but I don’t know if they are the best options:
% (colorN(1) to colorN(3) are the RGB value of the color)
% Method 1:
if abs(double(color1(1)) – double(color2(1))) < 15 …
&& abs(double(color1(2)) – double(color2(2))) < 15 …
&& abs(double(color1(3)) – double(color2(3))) < 15
% The colors are similar
end
% Method 2
if sum(abs(double(color1(1)) – double(color2(1))), …
abs(double(color1(2)) – double(color2(2))), …
abs(double(color1(3)) – double(color2(3)))) < 15
% The colors are similar
end
% Maybe method 3 which is a combination of the two.
I’ve tried these a little bit by myself but I wasn’t happy with the results. Anyone knows a better way to compare? Does Matlab have a function for that? color, image processing, image, compare, rgb MATLAB Answers — New Questions
How to configure the default message and the hyperlink of the help command for published functions
I have published the documentation for a function that I coded with publishing markups in html format but when I type help myFunction in my Command Window at the end appears two lines by default like the following ones:
"Published output in the Help browser
showdemo myFunction (<- hyperlink)."
Is there a way to configure the way this two lines are shown? Like for example, change them to something like this:
"For more information see myFunction"I have published the documentation for a function that I coded with publishing markups in html format but when I type help myFunction in my Command Window at the end appears two lines by default like the following ones:
"Published output in the Help browser
showdemo myFunction (<- hyperlink)."
Is there a way to configure the way this two lines are shown? Like for example, change them to something like this:
"For more information see myFunction" I have published the documentation for a function that I coded with publishing markups in html format but when I type help myFunction in my Command Window at the end appears two lines by default like the following ones:
"Published output in the Help browser
showdemo myFunction (<- hyperlink)."
Is there a way to configure the way this two lines are shown? Like for example, change them to something like this:
"For more information see myFunction" help, publish MATLAB Answers — New Questions
How do I incorporate PDEmodel for uncoupled thermo-elastic analysis?
I’ve been trying to solve the Navier-Lame equation for thermoelasticity in a reinforced concrete beam by incorporating PDEmodel. It’s inconvinient, but I want my Young’s modulus to be a function of temperature. My procedure is solving a thermal transient problem and then taking the obtained temperature field into my c and f coefficients. The geometry is created via multicuboid, then transformed into fegeometry and fed to the thermal transient model. Then the same geometry (before conversion to fegeometry) is assigned to the general pde model (createpde(3)). The mesh is seperate between models.
The solution I get is nonsense: displacements for a 2m beam, fixed on both ends and subjected to temperature gradient of 1500K/m is around 1.2m (looks like torsion). I cannot find any mathematical errors. The attached code shows my definition of both c and f coefficients (it is just an overview). Can I use the interpolateTemperature and evaluateTemperatureGradient effectively inside my coefficients? Perhaps there is another problem with my approach or some PDE Toolbox limitations?
Thanks for any potential help on this.
Best regards
KS
%Body of the structural problem, Rt are the thermal transient reults
model = createpde(3);
model.Geometry = g;
generateMesh(model, ‘Hmax’, 0.01);
ccoeff1 = @(location,state) myfunWithAdditionalArgs1(location,state, Rt, length(tlist));
ccoeff2 = @(location,state) myfunWithAdditionalArgs2(location,state, Rt, length(tlist));
fcoeff1 = @(location,state) myfunWithAdditionalArgs3(location, state, Rt, length(tlist));
fcoeff2 = @(location,state) myfunWithAdditionalArgs4(location,state, Rt, length(tlist));
gcoef = @(location,state) myfunWithAdditionalArgs5(location,state, Rt, length(tlist));
specifyCoefficients(model,’m’,0,’d’,0,’c’, ccoeff1,’a’,0,’f’,[0;0;0], ‘Cell’, 1);
specifyCoefficients(model,m=0,d=0,c=ccoeff2,a=0,f=[0;0;0], Cell=[2, 3]);
applyBoundaryCondition(model, "neumann", g=gcoef, Face=[3, 4, 5, 6]);
applyBoundaryCondition(model,"dirichlet",Face=2,u=[0,0,0]);
applyBoundaryCondition(model,"dirichlet",Face=1,u=[0,0,0]);
result = solvepde(model)
%Defining of the coefficients-just the concrete
ccoeff1 = @(location,state) myfunWithAdditionalArgs1(location,state, Rt, length(tlist));
function cmatrix1 = myfunWithAdditionalArgs1(location, state, T, id)
n1 = 45;
nr = numel(location.x);
cmatrix1 = zeros(n1, nr);
E = 30e9.*(1-0.0001*interpolateTemperature(T, location.x, location.y, location.z, id));
nu = 0.2;
mu = E./(2.*(1+nu));
lambda = E.*nu./((1-2.*nu).*(1+nu));
cmatrix1 (1,:) = 2.*mu+lambda;
cmatrix1 (3,:) = mu;
cmatrix1 (6,:) = mu;
cmatrix1 (8,:) = mu;
cmatrix1 (10,:) = lambda;
cmatrix1 (16,:) = mu;
cmatrix1 (18,:) = 2.*mu+lambda;
cmatrix1 (21,:) = mu;
cmatrix1 (24,:) = mu;
cmatrix1 (28,:) = lambda;
cmatrix1 (36,:) = mu;
cmatrix1 (38,:) = lambda;
cmatrix1 (40,:) = mu;
cmatrix1 (42,:) = mu;
cmatrix1 (45,:) = 2.*mu+lambda;
end
fcoeff1 = @(location,state) myfunWithAdditionalArgs3(location, state, Rt, length(tlist));
function fmatrix1 = myfunWithAdditionalArgs3(location, state, T, id)
n1=3;
nr = numel(location.x);
fmatrix1 = zeros(n1, nr);
alpha = 1.2e-5;
nu = 0.2;
E =30e9.*(1-0.0001*interpolateTemperature(T, location.x, location.y, location.z, id));
[gradTx, gradTy, gradTz] = evaluateTemperatureGradient(T, location.x, location.y, location.z, id);
fmatrix1(1,:) = E.*alpha.*gradTx./(1-2.*nu);
fmatrix1(2,:) = E.*alpha.*gradTy./(1-2.*nu);
fmatrix1(3,:) = E.*alpha.*gradTz./(1-2.*nu);
endI’ve been trying to solve the Navier-Lame equation for thermoelasticity in a reinforced concrete beam by incorporating PDEmodel. It’s inconvinient, but I want my Young’s modulus to be a function of temperature. My procedure is solving a thermal transient problem and then taking the obtained temperature field into my c and f coefficients. The geometry is created via multicuboid, then transformed into fegeometry and fed to the thermal transient model. Then the same geometry (before conversion to fegeometry) is assigned to the general pde model (createpde(3)). The mesh is seperate between models.
The solution I get is nonsense: displacements for a 2m beam, fixed on both ends and subjected to temperature gradient of 1500K/m is around 1.2m (looks like torsion). I cannot find any mathematical errors. The attached code shows my definition of both c and f coefficients (it is just an overview). Can I use the interpolateTemperature and evaluateTemperatureGradient effectively inside my coefficients? Perhaps there is another problem with my approach or some PDE Toolbox limitations?
Thanks for any potential help on this.
Best regards
KS
%Body of the structural problem, Rt are the thermal transient reults
model = createpde(3);
model.Geometry = g;
generateMesh(model, ‘Hmax’, 0.01);
ccoeff1 = @(location,state) myfunWithAdditionalArgs1(location,state, Rt, length(tlist));
ccoeff2 = @(location,state) myfunWithAdditionalArgs2(location,state, Rt, length(tlist));
fcoeff1 = @(location,state) myfunWithAdditionalArgs3(location, state, Rt, length(tlist));
fcoeff2 = @(location,state) myfunWithAdditionalArgs4(location,state, Rt, length(tlist));
gcoef = @(location,state) myfunWithAdditionalArgs5(location,state, Rt, length(tlist));
specifyCoefficients(model,’m’,0,’d’,0,’c’, ccoeff1,’a’,0,’f’,[0;0;0], ‘Cell’, 1);
specifyCoefficients(model,m=0,d=0,c=ccoeff2,a=0,f=[0;0;0], Cell=[2, 3]);
applyBoundaryCondition(model, "neumann", g=gcoef, Face=[3, 4, 5, 6]);
applyBoundaryCondition(model,"dirichlet",Face=2,u=[0,0,0]);
applyBoundaryCondition(model,"dirichlet",Face=1,u=[0,0,0]);
result = solvepde(model)
%Defining of the coefficients-just the concrete
ccoeff1 = @(location,state) myfunWithAdditionalArgs1(location,state, Rt, length(tlist));
function cmatrix1 = myfunWithAdditionalArgs1(location, state, T, id)
n1 = 45;
nr = numel(location.x);
cmatrix1 = zeros(n1, nr);
E = 30e9.*(1-0.0001*interpolateTemperature(T, location.x, location.y, location.z, id));
nu = 0.2;
mu = E./(2.*(1+nu));
lambda = E.*nu./((1-2.*nu).*(1+nu));
cmatrix1 (1,:) = 2.*mu+lambda;
cmatrix1 (3,:) = mu;
cmatrix1 (6,:) = mu;
cmatrix1 (8,:) = mu;
cmatrix1 (10,:) = lambda;
cmatrix1 (16,:) = mu;
cmatrix1 (18,:) = 2.*mu+lambda;
cmatrix1 (21,:) = mu;
cmatrix1 (24,:) = mu;
cmatrix1 (28,:) = lambda;
cmatrix1 (36,:) = mu;
cmatrix1 (38,:) = lambda;
cmatrix1 (40,:) = mu;
cmatrix1 (42,:) = mu;
cmatrix1 (45,:) = 2.*mu+lambda;
end
fcoeff1 = @(location,state) myfunWithAdditionalArgs3(location, state, Rt, length(tlist));
function fmatrix1 = myfunWithAdditionalArgs3(location, state, T, id)
n1=3;
nr = numel(location.x);
fmatrix1 = zeros(n1, nr);
alpha = 1.2e-5;
nu = 0.2;
E =30e9.*(1-0.0001*interpolateTemperature(T, location.x, location.y, location.z, id));
[gradTx, gradTy, gradTz] = evaluateTemperatureGradient(T, location.x, location.y, location.z, id);
fmatrix1(1,:) = E.*alpha.*gradTx./(1-2.*nu);
fmatrix1(2,:) = E.*alpha.*gradTy./(1-2.*nu);
fmatrix1(3,:) = E.*alpha.*gradTz./(1-2.*nu);
end I’ve been trying to solve the Navier-Lame equation for thermoelasticity in a reinforced concrete beam by incorporating PDEmodel. It’s inconvinient, but I want my Young’s modulus to be a function of temperature. My procedure is solving a thermal transient problem and then taking the obtained temperature field into my c and f coefficients. The geometry is created via multicuboid, then transformed into fegeometry and fed to the thermal transient model. Then the same geometry (before conversion to fegeometry) is assigned to the general pde model (createpde(3)). The mesh is seperate between models.
The solution I get is nonsense: displacements for a 2m beam, fixed on both ends and subjected to temperature gradient of 1500K/m is around 1.2m (looks like torsion). I cannot find any mathematical errors. The attached code shows my definition of both c and f coefficients (it is just an overview). Can I use the interpolateTemperature and evaluateTemperatureGradient effectively inside my coefficients? Perhaps there is another problem with my approach or some PDE Toolbox limitations?
Thanks for any potential help on this.
Best regards
KS
%Body of the structural problem, Rt are the thermal transient reults
model = createpde(3);
model.Geometry = g;
generateMesh(model, ‘Hmax’, 0.01);
ccoeff1 = @(location,state) myfunWithAdditionalArgs1(location,state, Rt, length(tlist));
ccoeff2 = @(location,state) myfunWithAdditionalArgs2(location,state, Rt, length(tlist));
fcoeff1 = @(location,state) myfunWithAdditionalArgs3(location, state, Rt, length(tlist));
fcoeff2 = @(location,state) myfunWithAdditionalArgs4(location,state, Rt, length(tlist));
gcoef = @(location,state) myfunWithAdditionalArgs5(location,state, Rt, length(tlist));
specifyCoefficients(model,’m’,0,’d’,0,’c’, ccoeff1,’a’,0,’f’,[0;0;0], ‘Cell’, 1);
specifyCoefficients(model,m=0,d=0,c=ccoeff2,a=0,f=[0;0;0], Cell=[2, 3]);
applyBoundaryCondition(model, "neumann", g=gcoef, Face=[3, 4, 5, 6]);
applyBoundaryCondition(model,"dirichlet",Face=2,u=[0,0,0]);
applyBoundaryCondition(model,"dirichlet",Face=1,u=[0,0,0]);
result = solvepde(model)
%Defining of the coefficients-just the concrete
ccoeff1 = @(location,state) myfunWithAdditionalArgs1(location,state, Rt, length(tlist));
function cmatrix1 = myfunWithAdditionalArgs1(location, state, T, id)
n1 = 45;
nr = numel(location.x);
cmatrix1 = zeros(n1, nr);
E = 30e9.*(1-0.0001*interpolateTemperature(T, location.x, location.y, location.z, id));
nu = 0.2;
mu = E./(2.*(1+nu));
lambda = E.*nu./((1-2.*nu).*(1+nu));
cmatrix1 (1,:) = 2.*mu+lambda;
cmatrix1 (3,:) = mu;
cmatrix1 (6,:) = mu;
cmatrix1 (8,:) = mu;
cmatrix1 (10,:) = lambda;
cmatrix1 (16,:) = mu;
cmatrix1 (18,:) = 2.*mu+lambda;
cmatrix1 (21,:) = mu;
cmatrix1 (24,:) = mu;
cmatrix1 (28,:) = lambda;
cmatrix1 (36,:) = mu;
cmatrix1 (38,:) = lambda;
cmatrix1 (40,:) = mu;
cmatrix1 (42,:) = mu;
cmatrix1 (45,:) = 2.*mu+lambda;
end
fcoeff1 = @(location,state) myfunWithAdditionalArgs3(location, state, Rt, length(tlist));
function fmatrix1 = myfunWithAdditionalArgs3(location, state, T, id)
n1=3;
nr = numel(location.x);
fmatrix1 = zeros(n1, nr);
alpha = 1.2e-5;
nu = 0.2;
E =30e9.*(1-0.0001*interpolateTemperature(T, location.x, location.y, location.z, id));
[gradTx, gradTy, gradTz] = evaluateTemperatureGradient(T, location.x, location.y, location.z, id);
fmatrix1(1,:) = E.*alpha.*gradTx./(1-2.*nu);
fmatrix1(2,:) = E.*alpha.*gradTy./(1-2.*nu);
fmatrix1(3,:) = E.*alpha.*gradTz./(1-2.*nu);
end pde toolbox, pdemodel MATLAB Answers — New Questions
Passive noise filter simulation model to check attenuation frequency response in power supplies
any simulation model to check attenuation frequency response of ferrite core inductor noise filterany simulation model to check attenuation frequency response of ferrite core inductor noise filter any simulation model to check attenuation frequency response of ferrite core inductor noise filter noise filter, ferrite core, frequency respose MATLAB Answers — New Questions









