Month: January 2025
Error: following inductors are connected with the following voltage source error matlab
Hi,
We are trying to simulate a circuit and we face attached error. Is there any particular reason why this comes and kindly let us know the solution for the same as well.Hi,
We are trying to simulate a circuit and we face attached error. Is there any particular reason why this comes and kindly let us know the solution for the same as well. Hi,
We are trying to simulate a circuit and we face attached error. Is there any particular reason why this comes and kindly let us know the solution for the same as well. simulink, error MATLAB Answers — New Questions
Writing to table in matlab does not appear in a shared workbook?
Trying to write to a excel workbook that has shared privileges. The shared workbook works when two seperate people open it and make changes. Where there is conflict a box appears that allows the users to accept the changes etc…
When i write on the same line using matlab, then use the write command to save it. The changes do not appear on the opened workbook when clicking save. It just saves whatever is in the current workbook at that time with 0 conflicts, even though matlab has already wrote to it.
You only see the changes when you close the workbook and open it again without hitting save.
Is there a way round this ?Trying to write to a excel workbook that has shared privileges. The shared workbook works when two seperate people open it and make changes. Where there is conflict a box appears that allows the users to accept the changes etc…
When i write on the same line using matlab, then use the write command to save it. The changes do not appear on the opened workbook when clicking save. It just saves whatever is in the current workbook at that time with 0 conflicts, even though matlab has already wrote to it.
You only see the changes when you close the workbook and open it again without hitting save.
Is there a way round this ? Trying to write to a excel workbook that has shared privileges. The shared workbook works when two seperate people open it and make changes. Where there is conflict a box appears that allows the users to accept the changes etc…
When i write on the same line using matlab, then use the write command to save it. The changes do not appear on the opened workbook when clicking save. It just saves whatever is in the current workbook at that time with 0 conflicts, even though matlab has already wrote to it.
You only see the changes when you close the workbook and open it again without hitting save.
Is there a way round this ? matlab, excel, writetable MATLAB Answers — New Questions
For a parent variant + referenced subsystem with a child variant subsystem, can I have the variant control choice for the children be unique for each referenced parent?
Hi,
I have a parent variant subsystem with 2 choices. This is also a referenced subsystem and is used in 3 instances, let’s name them: A, B and C.
Within each parent there is a child variant subsystem with also two choices, ie. Parent_A -> Parent_A_Choice_X -> Child -> Child_Choice_Y
, where X is the variant choice for the parent subsystem and Y is the variant choice for the child subsystem.
My isssue is, that when I define the variant choice conditions (I do this in expression mode) for one of the children, the choice propagates to all the referenced parent subsystems A, B and C. The functionality I would like is that I can choose unique expressions for the children in each of the parent subsystems.
Is there any way to do this?
Best regards,
Emil MunkHi,
I have a parent variant subsystem with 2 choices. This is also a referenced subsystem and is used in 3 instances, let’s name them: A, B and C.
Within each parent there is a child variant subsystem with also two choices, ie. Parent_A -> Parent_A_Choice_X -> Child -> Child_Choice_Y
, where X is the variant choice for the parent subsystem and Y is the variant choice for the child subsystem.
My isssue is, that when I define the variant choice conditions (I do this in expression mode) for one of the children, the choice propagates to all the referenced parent subsystems A, B and C. The functionality I would like is that I can choose unique expressions for the children in each of the parent subsystems.
Is there any way to do this?
Best regards,
Emil Munk Hi,
I have a parent variant subsystem with 2 choices. This is also a referenced subsystem and is used in 3 instances, let’s name them: A, B and C.
Within each parent there is a child variant subsystem with also two choices, ie. Parent_A -> Parent_A_Choice_X -> Child -> Child_Choice_Y
, where X is the variant choice for the parent subsystem and Y is the variant choice for the child subsystem.
My isssue is, that when I define the variant choice conditions (I do this in expression mode) for one of the children, the choice propagates to all the referenced parent subsystems A, B and C. The functionality I would like is that I can choose unique expressions for the children in each of the parent subsystems.
Is there any way to do this?
Best regards,
Emil Munk simulink, variant subsystem, referenced subsystem, variant choice MATLAB Answers — New Questions
Band pass filtering of time series data
Hello, I am trying to replicate this study that filters the time series of the H-component of the magnetic field in the period range of 10-45 seconds to see ultralow frequency variations around the time of an earthquake or volcanic event, so may I ask anyone how to use the bandpass function in MATLAB right in this case?
Here’s my silly attempt
fs = 1/60; %since the data is per minute
bandpass(T.DAVH,[0.022 0.1],fs); % period range of 10-45 seconds to frequency in Hz
but it returns
Warning: Specified passband frequency is beyond the Nyquist range so signal has been
filtered with an allstop filter.
> In highpass>designFilter (line 129)
In highpass (line 97)
In bandpass>performHighpassFiltering (line 149)
In bandpass (line 116)
Attached the data below where T.DAVH is the H-component of the magnetic field measured in Davao station.
The description of the data is as follows:
Format IAGA-2002 |
Source of Data Kyushu University (KU) |
Station Name Davao |
IAGA CODE DAV (KU code) |
Geodetic Latitude 007.000 |
Geodetic Longitude 125.400 |
Elevation 8888.88 |
Reported HDZF |
Sensor Orientation HDZ |
Digital Sampling 1 seconds |
Data Interval Type Averaged 1-minute (00:30 – 01:29) |
Data Type Provisional
Thank you to anyone who can help!Hello, I am trying to replicate this study that filters the time series of the H-component of the magnetic field in the period range of 10-45 seconds to see ultralow frequency variations around the time of an earthquake or volcanic event, so may I ask anyone how to use the bandpass function in MATLAB right in this case?
Here’s my silly attempt
fs = 1/60; %since the data is per minute
bandpass(T.DAVH,[0.022 0.1],fs); % period range of 10-45 seconds to frequency in Hz
but it returns
Warning: Specified passband frequency is beyond the Nyquist range so signal has been
filtered with an allstop filter.
> In highpass>designFilter (line 129)
In highpass (line 97)
In bandpass>performHighpassFiltering (line 149)
In bandpass (line 116)
Attached the data below where T.DAVH is the H-component of the magnetic field measured in Davao station.
The description of the data is as follows:
Format IAGA-2002 |
Source of Data Kyushu University (KU) |
Station Name Davao |
IAGA CODE DAV (KU code) |
Geodetic Latitude 007.000 |
Geodetic Longitude 125.400 |
Elevation 8888.88 |
Reported HDZF |
Sensor Orientation HDZ |
Digital Sampling 1 seconds |
Data Interval Type Averaged 1-minute (00:30 – 01:29) |
Data Type Provisional
Thank you to anyone who can help! Hello, I am trying to replicate this study that filters the time series of the H-component of the magnetic field in the period range of 10-45 seconds to see ultralow frequency variations around the time of an earthquake or volcanic event, so may I ask anyone how to use the bandpass function in MATLAB right in this case?
Here’s my silly attempt
fs = 1/60; %since the data is per minute
bandpass(T.DAVH,[0.022 0.1],fs); % period range of 10-45 seconds to frequency in Hz
but it returns
Warning: Specified passband frequency is beyond the Nyquist range so signal has been
filtered with an allstop filter.
> In highpass>designFilter (line 129)
In highpass (line 97)
In bandpass>performHighpassFiltering (line 149)
In bandpass (line 116)
Attached the data below where T.DAVH is the H-component of the magnetic field measured in Davao station.
The description of the data is as follows:
Format IAGA-2002 |
Source of Data Kyushu University (KU) |
Station Name Davao |
IAGA CODE DAV (KU code) |
Geodetic Latitude 007.000 |
Geodetic Longitude 125.400 |
Elevation 8888.88 |
Reported HDZF |
Sensor Orientation HDZ |
Digital Sampling 1 seconds |
Data Interval Type Averaged 1-minute (00:30 – 01:29) |
Data Type Provisional
Thank you to anyone who can help! signal processing, bandpass filtering, bandpass MATLAB Answers — New Questions
Keeping the scale in subplots when on is changed
Hi, I have the following plot. When I usex the option "axis aquare" for figure (b), Figure (c) does not scale properly with figure (b). There is away how to keep the scale similar in the other figures despite I changed the properties of one of them. Thank you for your help.Hi, I have the following plot. When I usex the option "axis aquare" for figure (b), Figure (c) does not scale properly with figure (b). There is away how to keep the scale similar in the other figures despite I changed the properties of one of them. Thank you for your help. Hi, I have the following plot. When I usex the option "axis aquare" for figure (b), Figure (c) does not scale properly with figure (b). There is away how to keep the scale similar in the other figures despite I changed the properties of one of them. Thank you for your help. keeping scale properties of a subplots MATLAB Answers — New Questions
How to find the RMSE?
I have the following code:
clear;clc
ula = phased.ULA(‘NumElements’,10,’ElementSpacing’,0.5);
angs = [40 -20 20; 0 0 0];% angs=[azimuth; elevation]; My desired angles are 40, -20 and 20.
NumSignals = size(angs,2);
c = physconst(‘LightSpeed’);
fc = 300e6; % Operating frequency
lambda = c/fc;
pos = getElementPosition(ula)/lambda;
Nsamp = 1000;
nPower = 0.01;
rs = rng(2007);
signal = sensorsig(pos,Nsamp,angs,nPower);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MUSIC Algorithm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
musicspatialspect = phased.MUSICEstimator(‘SensorArray’,ula,…
‘OperatingFrequency’,fc,’ScanAngles’,-90:90,…
‘DOAOutputPort’,true,’NumSignalsSource’,’Property’,’NumSignals’,NumSignals);
[~,ang] = musicspatialspect(signal)
ymusic = musicspatialspect(signal);
helperPlotDOASpectra(musicspatialspect.ScanAngles,ymusic)% Changed by Me
function helperPlotDOASpectra(x2,y2)% Changed by Me
% Plot spectra in dB normalized to 0 dB at the peak
y2_dB = 20*log10(y2) – max(20*log10(y2));
plot(x2,y2_dB)
xlabel(‘Broadside Angle (degrees)’);
ylabel(‘Power (dB)’);
title(‘DOA Spatial Spectra’)
end
This estimates the angles and displays them in the command window. It also gives me the plot. Now I want to find the RMSE plot i.e., the root mean square error vs number of runs plot , where number of runs=100. The RMSE is between the actual angles i.e., 40 -20 20 assigend to "angs" and the estimated angles in variable "ang". But I don’t know how to do it?I have the following code:
clear;clc
ula = phased.ULA(‘NumElements’,10,’ElementSpacing’,0.5);
angs = [40 -20 20; 0 0 0];% angs=[azimuth; elevation]; My desired angles are 40, -20 and 20.
NumSignals = size(angs,2);
c = physconst(‘LightSpeed’);
fc = 300e6; % Operating frequency
lambda = c/fc;
pos = getElementPosition(ula)/lambda;
Nsamp = 1000;
nPower = 0.01;
rs = rng(2007);
signal = sensorsig(pos,Nsamp,angs,nPower);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MUSIC Algorithm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
musicspatialspect = phased.MUSICEstimator(‘SensorArray’,ula,…
‘OperatingFrequency’,fc,’ScanAngles’,-90:90,…
‘DOAOutputPort’,true,’NumSignalsSource’,’Property’,’NumSignals’,NumSignals);
[~,ang] = musicspatialspect(signal)
ymusic = musicspatialspect(signal);
helperPlotDOASpectra(musicspatialspect.ScanAngles,ymusic)% Changed by Me
function helperPlotDOASpectra(x2,y2)% Changed by Me
% Plot spectra in dB normalized to 0 dB at the peak
y2_dB = 20*log10(y2) – max(20*log10(y2));
plot(x2,y2_dB)
xlabel(‘Broadside Angle (degrees)’);
ylabel(‘Power (dB)’);
title(‘DOA Spatial Spectra’)
end
This estimates the angles and displays them in the command window. It also gives me the plot. Now I want to find the RMSE plot i.e., the root mean square error vs number of runs plot , where number of runs=100. The RMSE is between the actual angles i.e., 40 -20 20 assigend to "angs" and the estimated angles in variable "ang". But I don’t know how to do it? I have the following code:
clear;clc
ula = phased.ULA(‘NumElements’,10,’ElementSpacing’,0.5);
angs = [40 -20 20; 0 0 0];% angs=[azimuth; elevation]; My desired angles are 40, -20 and 20.
NumSignals = size(angs,2);
c = physconst(‘LightSpeed’);
fc = 300e6; % Operating frequency
lambda = c/fc;
pos = getElementPosition(ula)/lambda;
Nsamp = 1000;
nPower = 0.01;
rs = rng(2007);
signal = sensorsig(pos,Nsamp,angs,nPower);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MUSIC Algorithm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
musicspatialspect = phased.MUSICEstimator(‘SensorArray’,ula,…
‘OperatingFrequency’,fc,’ScanAngles’,-90:90,…
‘DOAOutputPort’,true,’NumSignalsSource’,’Property’,’NumSignals’,NumSignals);
[~,ang] = musicspatialspect(signal)
ymusic = musicspatialspect(signal);
helperPlotDOASpectra(musicspatialspect.ScanAngles,ymusic)% Changed by Me
function helperPlotDOASpectra(x2,y2)% Changed by Me
% Plot spectra in dB normalized to 0 dB at the peak
y2_dB = 20*log10(y2) – max(20*log10(y2));
plot(x2,y2_dB)
xlabel(‘Broadside Angle (degrees)’);
ylabel(‘Power (dB)’);
title(‘DOA Spatial Spectra’)
end
This estimates the angles and displays them in the command window. It also gives me the plot. Now I want to find the RMSE plot i.e., the root mean square error vs number of runs plot , where number of runs=100. The RMSE is between the actual angles i.e., 40 -20 20 assigend to "angs" and the estimated angles in variable "ang". But I don’t know how to do it? rmse, root mean sqaure error, music, algorithm MATLAB Answers — New Questions
Minimum of bivariable function
Hi everyone,
I just started using MATLAB and I’m trying to find the minmum of a bivariable function (CT(T1, T2)) and the correspoding 2D plot. Below the code used:
clear all ; clc ;
syms x;
syms T1;
syms T2;
H1=50;
%T2=10;
%T1=11;
Mp1=400;
Mc1=1500;
Mp2= 442.0684;
Mc2=1700;
H=100;
H2=H-H1;
w=0.1;
F1=@(T1)1-exp(-((T1-x)./100)).^2;
F2=@(T2) 1-exp(-((T2-x)./100)).^1.8;
f1=@(T1) 1-exp(-((H1-floor(H1./T1).*T1)-x)./100).^2;
f2=@(T2) 1-exp(-((H2-floor(H2./T2).*T2)-x)./100).^1.8;
A=@(T1)((H1./T1).*((-log(1-int(((30).*exp(-30).*x)*((1-exp(-((T1-x)./100)).^2)),0,T1)).*Mc1+(Mp1))))./H1;
B=@(T1)(-log(1-int((F1*((30).*exp(-30).*x)),0,(H1-(floor(H1./T1)).*T1)).*Mc1)./H1);
C=Mp2./H1;
D=@(T2)((H2./T2).*((-log(1-int(((1-exp(-((T2-x)./100)).^1.8))*((25).*exp(-25).*x),0,T2))).*(Mp1.*exp(w))))./H2;
E=@(T2)((-log(1-int((1-exp(-((H2-((H2./T2)).*T2)-x)./100))*((25).*exp(-25).*x),0,(H2-((H2./T2))).*T2))))*(Mc1.*exp(w))./H2;
CT=@(T1,T2)(A(T1)+B(T1)+C+D(T2)+E(T2))
Thanks.Hi everyone,
I just started using MATLAB and I’m trying to find the minmum of a bivariable function (CT(T1, T2)) and the correspoding 2D plot. Below the code used:
clear all ; clc ;
syms x;
syms T1;
syms T2;
H1=50;
%T2=10;
%T1=11;
Mp1=400;
Mc1=1500;
Mp2= 442.0684;
Mc2=1700;
H=100;
H2=H-H1;
w=0.1;
F1=@(T1)1-exp(-((T1-x)./100)).^2;
F2=@(T2) 1-exp(-((T2-x)./100)).^1.8;
f1=@(T1) 1-exp(-((H1-floor(H1./T1).*T1)-x)./100).^2;
f2=@(T2) 1-exp(-((H2-floor(H2./T2).*T2)-x)./100).^1.8;
A=@(T1)((H1./T1).*((-log(1-int(((30).*exp(-30).*x)*((1-exp(-((T1-x)./100)).^2)),0,T1)).*Mc1+(Mp1))))./H1;
B=@(T1)(-log(1-int((F1*((30).*exp(-30).*x)),0,(H1-(floor(H1./T1)).*T1)).*Mc1)./H1);
C=Mp2./H1;
D=@(T2)((H2./T2).*((-log(1-int(((1-exp(-((T2-x)./100)).^1.8))*((25).*exp(-25).*x),0,T2))).*(Mp1.*exp(w))))./H2;
E=@(T2)((-log(1-int((1-exp(-((H2-((H2./T2)).*T2)-x)./100))*((25).*exp(-25).*x),0,(H2-((H2./T2))).*T2))))*(Mc1.*exp(w))./H2;
CT=@(T1,T2)(A(T1)+B(T1)+C+D(T2)+E(T2))
Thanks. Hi everyone,
I just started using MATLAB and I’m trying to find the minmum of a bivariable function (CT(T1, T2)) and the correspoding 2D plot. Below the code used:
clear all ; clc ;
syms x;
syms T1;
syms T2;
H1=50;
%T2=10;
%T1=11;
Mp1=400;
Mc1=1500;
Mp2= 442.0684;
Mc2=1700;
H=100;
H2=H-H1;
w=0.1;
F1=@(T1)1-exp(-((T1-x)./100)).^2;
F2=@(T2) 1-exp(-((T2-x)./100)).^1.8;
f1=@(T1) 1-exp(-((H1-floor(H1./T1).*T1)-x)./100).^2;
f2=@(T2) 1-exp(-((H2-floor(H2./T2).*T2)-x)./100).^1.8;
A=@(T1)((H1./T1).*((-log(1-int(((30).*exp(-30).*x)*((1-exp(-((T1-x)./100)).^2)),0,T1)).*Mc1+(Mp1))))./H1;
B=@(T1)(-log(1-int((F1*((30).*exp(-30).*x)),0,(H1-(floor(H1./T1)).*T1)).*Mc1)./H1);
C=Mp2./H1;
D=@(T2)((H2./T2).*((-log(1-int(((1-exp(-((T2-x)./100)).^1.8))*((25).*exp(-25).*x),0,T2))).*(Mp1.*exp(w))))./H2;
E=@(T2)((-log(1-int((1-exp(-((H2-((H2./T2)).*T2)-x)./100))*((25).*exp(-25).*x),0,(H2-((H2./T2))).*T2))))*(Mc1.*exp(w))./H2;
CT=@(T1,T2)(A(T1)+B(T1)+C+D(T2)+E(T2))
Thanks. bivariable, optimization MATLAB Answers — New Questions
where can I find the code?
where can I find the code of helperPlotDOASpectra?where can I find the code of helperPlotDOASpectra? where can I find the code of helperPlotDOASpectra? doa, direction of arrival, missing code MATLAB Answers — New Questions
How to keep pressed the SHIFT button on the keyboard?
Hi all! I have two monitors and I need to pass the browser window form the left monitor to the right monitor. The shortcut to do this on the keyboard is: WINDOW + SHIFT + RIGHT ARROW. If i press phisically those 3 buttons on the keyboard the windows is correctly moved to the right monitor, however, if I try to do the same on MATLAB with this code:
import java.awt.*;
import java.awt.event.*;
rob=Robot;
[stat, h, url] = web(‘https://www.google.com’,’-new’);
pause(5)
rob.keyPress(KeyEvent.VK_WINDOWS);
rob.keyPress(KeyEvent.VK_SHIFT);
rob.keyPress(KeyEvent.VK_RIGHT);
rob.keyRelease(KeyEvent.VK_RIGHT);
rob.keyRelease(KeyEvent.VK_SHIFT);
rob.keyRelease(KeyEvent.VK_WINDOWS);
The output is like I press WINDOW + RIGHT ARROW. So, seems like the SHIFT button is pressed and released before the RIGHT ARROW button. Someone can help me? Many thanks!Hi all! I have two monitors and I need to pass the browser window form the left monitor to the right monitor. The shortcut to do this on the keyboard is: WINDOW + SHIFT + RIGHT ARROW. If i press phisically those 3 buttons on the keyboard the windows is correctly moved to the right monitor, however, if I try to do the same on MATLAB with this code:
import java.awt.*;
import java.awt.event.*;
rob=Robot;
[stat, h, url] = web(‘https://www.google.com’,’-new’);
pause(5)
rob.keyPress(KeyEvent.VK_WINDOWS);
rob.keyPress(KeyEvent.VK_SHIFT);
rob.keyPress(KeyEvent.VK_RIGHT);
rob.keyRelease(KeyEvent.VK_RIGHT);
rob.keyRelease(KeyEvent.VK_SHIFT);
rob.keyRelease(KeyEvent.VK_WINDOWS);
The output is like I press WINDOW + RIGHT ARROW. So, seems like the SHIFT button is pressed and released before the RIGHT ARROW button. Someone can help me? Many thanks! Hi all! I have two monitors and I need to pass the browser window form the left monitor to the right monitor. The shortcut to do this on the keyboard is: WINDOW + SHIFT + RIGHT ARROW. If i press phisically those 3 buttons on the keyboard the windows is correctly moved to the right monitor, however, if I try to do the same on MATLAB with this code:
import java.awt.*;
import java.awt.event.*;
rob=Robot;
[stat, h, url] = web(‘https://www.google.com’,’-new’);
pause(5)
rob.keyPress(KeyEvent.VK_WINDOWS);
rob.keyPress(KeyEvent.VK_SHIFT);
rob.keyPress(KeyEvent.VK_RIGHT);
rob.keyRelease(KeyEvent.VK_RIGHT);
rob.keyRelease(KeyEvent.VK_SHIFT);
rob.keyRelease(KeyEvent.VK_WINDOWS);
The output is like I press WINDOW + RIGHT ARROW. So, seems like the SHIFT button is pressed and released before the RIGHT ARROW button. Someone can help me? Many thanks! java, keypress MATLAB Answers — New Questions
Binary image feature extraction
I want to perform feature based image registration on two binary images.
What feature extraction algorithm should i use, to extract sufficient features from the binary images.I want to perform feature based image registration on two binary images.
What feature extraction algorithm should i use, to extract sufficient features from the binary images. I want to perform feature based image registration on two binary images.
What feature extraction algorithm should i use, to extract sufficient features from the binary images. binary image, feature extraction MATLAB Answers — New Questions
Is there a function that returns a Bayes Model?
I used the function fitcnb to get a Naive Bayes Classifier but I need to get also a Bayes Classifier (which is the naive without the indipendence hyphotesis). Is there a function, similar to fitcnb, that returns a Bayes Model?I used the function fitcnb to get a Naive Bayes Classifier but I need to get also a Bayes Classifier (which is the naive without the indipendence hyphotesis). Is there a function, similar to fitcnb, that returns a Bayes Model? I used the function fitcnb to get a Naive Bayes Classifier but I need to get also a Bayes Classifier (which is the naive without the indipendence hyphotesis). Is there a function, similar to fitcnb, that returns a Bayes Model? bayes, function MATLAB Answers — New Questions
About converting Spice model to Simscape
I used the command subcircuit2ssc to convert a Spice model for the power diode to Simscape, and an error appears:
Error using subcircuit2ssc
Netlist is not supported. No valid subcircuits found.
The power diode Spice file is as follows:
.MODEL DRFN10RSM2STL1 D
+ IS=192.49E-12
+ N=1.1157
+ RS=4.3285E-3
+ IKF=98.758E-3
+ EG=0.88
+ CJO=168.00E-12
+ M=0.3114
+ VJ=0.5
+ ISR=539.76E-12
+ NR=1.95
+ BV=200
+ TT=26.548E-9
+ TIKF=0.012
I have succesfully converted a power MOSFET model from Spice to Simscape. I wonder why this does not work for diode. Thanks!I used the command subcircuit2ssc to convert a Spice model for the power diode to Simscape, and an error appears:
Error using subcircuit2ssc
Netlist is not supported. No valid subcircuits found.
The power diode Spice file is as follows:
.MODEL DRFN10RSM2STL1 D
+ IS=192.49E-12
+ N=1.1157
+ RS=4.3285E-3
+ IKF=98.758E-3
+ EG=0.88
+ CJO=168.00E-12
+ M=0.3114
+ VJ=0.5
+ ISR=539.76E-12
+ NR=1.95
+ BV=200
+ TT=26.548E-9
+ TIKF=0.012
I have succesfully converted a power MOSFET model from Spice to Simscape. I wonder why this does not work for diode. Thanks! I used the command subcircuit2ssc to convert a Spice model for the power diode to Simscape, and an error appears:
Error using subcircuit2ssc
Netlist is not supported. No valid subcircuits found.
The power diode Spice file is as follows:
.MODEL DRFN10RSM2STL1 D
+ IS=192.49E-12
+ N=1.1157
+ RS=4.3285E-3
+ IKF=98.758E-3
+ EG=0.88
+ CJO=168.00E-12
+ M=0.3114
+ VJ=0.5
+ ISR=539.76E-12
+ NR=1.95
+ BV=200
+ TT=26.548E-9
+ TIKF=0.012
I have succesfully converted a power MOSFET model from Spice to Simscape. I wonder why this does not work for diode. Thanks! spice, model, simscape, convert, power diode, subcircuit2ssc MATLAB Answers — New Questions
XML EDIT attribute value
My question might seem dumb but I can’t seem to find the answer: How can I edit certain values on an xml file that already exists?
I want to edit all the attributes values with values coming from an excel sheet. Is that possible?
Thanks!My question might seem dumb but I can’t seem to find the answer: How can I edit certain values on an xml file that already exists?
I want to edit all the attributes values with values coming from an excel sheet. Is that possible?
Thanks! My question might seem dumb but I can’t seem to find the answer: How can I edit certain values on an xml file that already exists?
I want to edit all the attributes values with values coming from an excel sheet. Is that possible?
Thanks! xml, xmledit MATLAB Answers — New Questions
matlab calculation area circular
I have a signal and want to calculate the area. The problem is that i want to make a loop with decimal step, because the length is 1189,58
Any ideas how to proceed with the loop?I have a signal and want to calculate the area. The problem is that i want to make a loop with decimal step, because the length is 1189,58
Any ideas how to proceed with the loop? I have a signal and want to calculate the area. The problem is that i want to make a loop with decimal step, because the length is 1189,58
Any ideas how to proceed with the loop? range, area MATLAB Answers — New Questions
Is it possible to use MATLAB on slave computer/device for communication to host computer via serial MODBUS (RTU)
Can I communicate with the host/master via serial port (MODBUS ASCII/RTU) using MATLAB on the slave computer, i.e. I need to wait for a request from the host/master, receive it when it comes and send back the requested data to the host. I found how this can implemented for MODBUS TCP/IP, but I did not find how to implement that for MODBUS ASCII/RTU (RS232, RS485). All MATLAB functions for serial port communication seem to be for the case when the code runs on the host computer. My MATLAB code runs on the slave device (processor/computer which controls the analytical instrument) and I need it to send the data when requested to the host (SCADA).Can I communicate with the host/master via serial port (MODBUS ASCII/RTU) using MATLAB on the slave computer, i.e. I need to wait for a request from the host/master, receive it when it comes and send back the requested data to the host. I found how this can implemented for MODBUS TCP/IP, but I did not find how to implement that for MODBUS ASCII/RTU (RS232, RS485). All MATLAB functions for serial port communication seem to be for the case when the code runs on the host computer. My MATLAB code runs on the slave device (processor/computer which controls the analytical instrument) and I need it to send the data when requested to the host (SCADA). Can I communicate with the host/master via serial port (MODBUS ASCII/RTU) using MATLAB on the slave computer, i.e. I need to wait for a request from the host/master, receive it when it comes and send back the requested data to the host. I found how this can implemented for MODBUS TCP/IP, but I did not find how to implement that for MODBUS ASCII/RTU (RS232, RS485). All MATLAB functions for serial port communication seem to be for the case when the code runs on the host computer. My MATLAB code runs on the slave device (processor/computer which controls the analytical instrument) and I need it to send the data when requested to the host (SCADA). serial port, modbus, modbus ascii, modbus rtu, modbus slave, modbus host, rs485, rs232 MATLAB Answers — New Questions
Convergence path error,Variables of this type do not support indexing with points.
I have a new problem, I obtain aspen convergence in the connection operation between aspen and matlab, my code is:
Conv = aspen.Tree.FindNode("DataResults SummaryRun-StatusOutputPER_ERROR");
I also found the corresponding path in aspen, but the code is wrong, At the same time, I have checked that CSDN does not support indexing with points for variables of this type, but when I change the code to:
Conv = Aspen.Tree.FindNode("DataResults SummaryRun-StatusOutputPER_ERROR");
ConvValue = Conv.Value;
I still get an errorI have a new problem, I obtain aspen convergence in the connection operation between aspen and matlab, my code is:
Conv = aspen.Tree.FindNode("DataResults SummaryRun-StatusOutputPER_ERROR");
I also found the corresponding path in aspen, but the code is wrong, At the same time, I have checked that CSDN does not support indexing with points for variables of this type, but when I change the code to:
Conv = Aspen.Tree.FindNode("DataResults SummaryRun-StatusOutputPER_ERROR");
ConvValue = Conv.Value;
I still get an error I have a new problem, I obtain aspen convergence in the connection operation between aspen and matlab, my code is:
Conv = aspen.Tree.FindNode("DataResults SummaryRun-StatusOutputPER_ERROR");
I also found the corresponding path in aspen, but the code is wrong, At the same time, I have checked that CSDN does not support indexing with points for variables of this type, but when I change the code to:
Conv = Aspen.Tree.FindNode("DataResults SummaryRun-StatusOutputPER_ERROR");
ConvValue = Conv.Value;
I still get an error aspen,matlab MATLAB Answers — New Questions
Closing windows CMD window after executing system and run through a certain algorithm
I want to use ‘system’ to open another software in cmd as well as forming a java socket between them to allow exchanging datas for calculation, as shown in the code below
% command to execute in cmd to form socket
commandString = strcat(‘"’, this.FreeFlyerPath, ‘FreeFlyer.exe"’, …
‘ -r -mp "’, this.MissionPlanPath, ‘sample.MissionPlan"’, …
sprintf(‘ -ui %d -ui %d -ui %s &’, portNum(1), portNum(2), this.terminationCode));
system( commandString );
%
%
%
%
% some algorithms
%
%
%
% how to close the cmd?
However, the function has to be looped multiple times, that means the cmd windows keep popping out like a virus without exiting. I tried system(‘exit’) and it does not work. May I know the correct way to close the cmd window after executed the function?I want to use ‘system’ to open another software in cmd as well as forming a java socket between them to allow exchanging datas for calculation, as shown in the code below
% command to execute in cmd to form socket
commandString = strcat(‘"’, this.FreeFlyerPath, ‘FreeFlyer.exe"’, …
‘ -r -mp "’, this.MissionPlanPath, ‘sample.MissionPlan"’, …
sprintf(‘ -ui %d -ui %d -ui %s &’, portNum(1), portNum(2), this.terminationCode));
system( commandString );
%
%
%
%
% some algorithms
%
%
%
% how to close the cmd?
However, the function has to be looped multiple times, that means the cmd windows keep popping out like a virus without exiting. I tried system(‘exit’) and it does not work. May I know the correct way to close the cmd window after executed the function? I want to use ‘system’ to open another software in cmd as well as forming a java socket between them to allow exchanging datas for calculation, as shown in the code below
% command to execute in cmd to form socket
commandString = strcat(‘"’, this.FreeFlyerPath, ‘FreeFlyer.exe"’, …
‘ -r -mp "’, this.MissionPlanPath, ‘sample.MissionPlan"’, …
sprintf(‘ -ui %d -ui %d -ui %s &’, portNum(1), portNum(2), this.terminationCode));
system( commandString );
%
%
%
%
% some algorithms
%
%
%
% how to close the cmd?
However, the function has to be looped multiple times, that means the cmd windows keep popping out like a virus without exiting. I tried system(‘exit’) and it does not work. May I know the correct way to close the cmd window after executed the function? system, cmd, exit MATLAB Answers — New Questions
Problem in applying Genetic algorithm solver in matlab while solving the electric bus scheduling problem
I am using a Genetic Algorithm (GA) solver in MATLAB to solve the electric bus scheduling problem. The objective function is designed to minimize the cost of electric buses and chargers while incorporating vehicle flow and charging constraints. However, when I apply the solver, it seems to ignore the charging constraints. It only outputs the number of electric buses along with their schedules, without assigning any buses to chargers. The output for chargers consistently shows a value of zero. When I tested the same dataset using CPLEX, it successfully assigned electric buses to chargers. How can I resolve this issue?
% Solver options
options = optimoptions(‘ga’, …
‘Display’, ‘iter’, … % Display iteration details
‘PlotFcn’, ‘gaplotbestf’, … % Plot GA progress
‘MaxTime’, 5000, … % Maximum runtime in seconds
‘PopulationSize’, 100, … % GA population size
‘CrossoverFraction’, 0.8); % Fraction for crossover
% Solve the optimization problem
[sol, fval, exitflag, output] = solve(Busschedulling_A, ‘Solver’, ‘ga’, ‘Options’, options);I am using a Genetic Algorithm (GA) solver in MATLAB to solve the electric bus scheduling problem. The objective function is designed to minimize the cost of electric buses and chargers while incorporating vehicle flow and charging constraints. However, when I apply the solver, it seems to ignore the charging constraints. It only outputs the number of electric buses along with their schedules, without assigning any buses to chargers. The output for chargers consistently shows a value of zero. When I tested the same dataset using CPLEX, it successfully assigned electric buses to chargers. How can I resolve this issue?
% Solver options
options = optimoptions(‘ga’, …
‘Display’, ‘iter’, … % Display iteration details
‘PlotFcn’, ‘gaplotbestf’, … % Plot GA progress
‘MaxTime’, 5000, … % Maximum runtime in seconds
‘PopulationSize’, 100, … % GA population size
‘CrossoverFraction’, 0.8); % Fraction for crossover
% Solve the optimization problem
[sol, fval, exitflag, output] = solve(Busschedulling_A, ‘Solver’, ‘ga’, ‘Options’, options); I am using a Genetic Algorithm (GA) solver in MATLAB to solve the electric bus scheduling problem. The objective function is designed to minimize the cost of electric buses and chargers while incorporating vehicle flow and charging constraints. However, when I apply the solver, it seems to ignore the charging constraints. It only outputs the number of electric buses along with their schedules, without assigning any buses to chargers. The output for chargers consistently shows a value of zero. When I tested the same dataset using CPLEX, it successfully assigned electric buses to chargers. How can I resolve this issue?
% Solver options
options = optimoptions(‘ga’, …
‘Display’, ‘iter’, … % Display iteration details
‘PlotFcn’, ‘gaplotbestf’, … % Plot GA progress
‘MaxTime’, 5000, … % Maximum runtime in seconds
‘PopulationSize’, 100, … % GA population size
‘CrossoverFraction’, 0.8); % Fraction for crossover
% Solve the optimization problem
[sol, fval, exitflag, output] = solve(Busschedulling_A, ‘Solver’, ‘ga’, ‘Options’, options); genetic algorithm, matlab, optimization, programming MATLAB Answers — New Questions
Teams Splits Recording and Transcription Settings for Meetings and Events
Separate Teams Policies Govern Recording and Transcription from February 2025
In a sensible decision announced in two Microsoft 365 message center posts on 3 January 2025, Microsoft plans to use separate Teams recording and transcription policies for meeting and events. Until now, the same org-wide meeting policy governed both kinds of gatherings. From late February 2025, all forms of meetings will use the current meeting policy while events will use settings in the Teams event policy. Separate settings are available to control recording and transcription in webinar and town hall events.
The relevant message center posts are MC971032 (recording) Microsoft 365 roadmap item 473887, and MC971031 (transcription), Microsoft 365 roadmap item 473886.
Managing Teams Recording and Transcription Policies
The settings for Teams recording and transcription policies can be managed through the Teams admin center (Figure 1) or with PowerShell. The settings dictate whether meeting organizers can record and transcribe their events.
The new recording and transcription settings are not currently available in the Teams admin center. In the interim, you can use PowerShell to update the default Teams event policy or configure new Teams event policies. For example, this example of using the Get-CsTeamsEventsPolicy cmdlet finds all Teams event policies in the tenant and outputs the value of the settings used to control recording and transcription for town hall and webinar events:
Get-CsTeamsEventsPolicy | Format-Table Identity, RecordingForTownhall, TranscriptionForTownHall, RecordingForWebinar, TranscriptionForWebinar -AutoSize Identity RecordingForTownhall TranscriptionForTownhall RecordingForWebinar TranscriptionForWebinar -------- -------------------- ------------------------ ------------------- ----------------------- Global Enabled Enabled Enabled Enabled Tag:WebinarOrganizers Enabled Enabled Enabled Enabled
The values shown above are the default. To disable a setting, run the Set-CsTeamsEventsPolicy cmdlet. For example:
Set-CsTeamsEventsPolicy -Identity Global -RecordingForTownHall Disabled
When updating Teams event policies, make sure that you use a current version of the Microsoft Teams PowerShell module (I used V6.7 for the commands shown above).
Transcription Default Setting Changing to On
There’s no doubt that meeting transcriptions are very useful, even if you don’t have Microsoft 365 Copilot or Teams Premium licenses to generate intelligent recaps from transcripts.
Reflecting the value of transcripts, Microsoft will introduce another change in February 2025 to enable transcripts for meetings as the default (currently, the setting is disabled). The change will apply to new tenants and any existing tenants if they don’t have customized meeting policies. In other words, if you have an existing Microsoft 365 tenant and have never changed the meeting policy, the transcription setting shown in Figure 1 will change from Off to On.
The update is documented in message center post MC973519 (7 January 2025, Microsoft 365 roadmap item 468282). Microsoft says that the change to the default transcription setting will make it consistent with the recording setting and notes that the change “is designed to streamline the adoption of transcription and enhance the use of all AI features.” There’s no point in having premium functionality ready to process transcripts if transcription is disabled.
Face and Voice Enrollment
Another change in this area is documented in MC912707 (updated 20 December 2024, Microsoft 365 roadmap item 413708), which governs voice and face profile enrolment for meetings held in rooms equipped with Teams Rooms devices. Microsoft plans to enable voice and face profile enrolment by default from mid-February 2025.
The problem that Microsoft is trying to solve is to differentiate between individuals in a meeting room so that contributions can be correctly attributed to the right person in the transcript. By enrolling their voice and face profile, users make it easier for Teams to identify them using technologies like facial and vocal recognition. See the Microsoft documentation for more information.
Some organizations aren’t too keen on users enrolling voice and face profiles. If you’re in this situation, you can disable enrolment using the Set-CsTeamsAIPolicy cmdlet. The default values are revealed with Get-CsTeamsAIPolicy:
Get-CsTeamsAIPolicy Identity EnrollFace EnrollVoice -------- ---------- ----------- Global Enabled Enabled
To disable the settings and prevent users enrolling a profile, run:
Set-CsTeamsAIPolicy -Identity Global -EnrollFace Disabled -EnrollVoice Disabled
Many Changes Around Transcription
Microsoft has been busy around meeting transcription over the last year. The activity has included moving Teams transcripts to OneDrive to make storage consistent and imposing tighter control over transcripts. Both steps were necessary predecessors before making meeting transcription the default. Not everyone will love the changes Microsoft is making to make transcription more pervasive and accurate. It’s your tenant, so take charge and decide what policy defaults you think are best to use.
Learn about using Teams and the rest of Microsoft 365 by subscribing to the Office 365 for IT Pros eBook. Use our experience to understand what’s important and how best to protect your tenant.
Warning: Parameter object’s DataType property has been set while its Value is not double precision.
I have this warnings in matlab
Warning: Parameter object’s DataType property has been set while its Value is not double precision. Converting Value to real-world value (double precision).
I use .m file when declare parameter
and delare like this
Y.Value = [fi([0,10,10,0,0,0,0,0,0,0], 1, 16, 0.01, 0)];
When I enterend Y Value in command Window say like this
Parameter with properties:
Value: [0 10 10 0 0 0 0 0 0 0]
CoderInfo: [1×1 Simulink.CoderInfo]
Description: ‘-‘
DataType: ‘fixdt(0,16,0.01,0)’
Min: []
Max: []
Unit: ”
Complexity: ‘real’
Dimensions: [1 10]
Why this warning happens?I have this warnings in matlab
Warning: Parameter object’s DataType property has been set while its Value is not double precision. Converting Value to real-world value (double precision).
I use .m file when declare parameter
and delare like this
Y.Value = [fi([0,10,10,0,0,0,0,0,0,0], 1, 16, 0.01, 0)];
When I enterend Y Value in command Window say like this
Parameter with properties:
Value: [0 10 10 0 0 0 0 0 0 0]
CoderInfo: [1×1 Simulink.CoderInfo]
Description: ‘-‘
DataType: ‘fixdt(0,16,0.01,0)’
Min: []
Max: []
Unit: ”
Complexity: ‘real’
Dimensions: [1 10]
Why this warning happens? I have this warnings in matlab
Warning: Parameter object’s DataType property has been set while its Value is not double precision. Converting Value to real-world value (double precision).
I use .m file when declare parameter
and delare like this
Y.Value = [fi([0,10,10,0,0,0,0,0,0,0], 1, 16, 0.01, 0)];
When I enterend Y Value in command Window say like this
Parameter with properties:
Value: [0 10 10 0 0 0 0 0 0 0]
CoderInfo: [1×1 Simulink.CoderInfo]
Description: ‘-‘
DataType: ‘fixdt(0,16,0.01,0)’
Min: []
Max: []
Unit: ”
Complexity: ‘real’
Dimensions: [1 10]
Why this warning happens? simulink, matlab MATLAB Answers — New Questions