Tag Archives: matlab
How can I dowload R2017b?
I unistalled a previous R2017b but now I am not able to install again, How can I do?I unistalled a previous R2017b but now I am not able to install again, How can I do? I unistalled a previous R2017b but now I am not able to install again, How can I do? r2017b MATLAB Answers — New Questions
Derivative free optimisation with over 100 variables
I have a problem for which I need to optimize more than a 100 variables with a derivative free method. Please note that the function used is a simulation that takes almost a minute to run. Which Matlab optimization tool would be the best for me ?I have a problem for which I need to optimize more than a 100 variables with a derivative free method. Please note that the function used is a simulation that takes almost a minute to run. Which Matlab optimization tool would be the best for me ? I have a problem for which I need to optimize more than a 100 variables with a derivative free method. Please note that the function used is a simulation that takes almost a minute to run. Which Matlab optimization tool would be the best for me ? optimization MATLAB Answers — New Questions
Is there a way to manually control and delay drawing with ‘nexttile’, similar to how ‘subplot’ behaves, to improve plotting performance?
Problem:When using subplot in a loop, MATLAB only updates the figure at the end, unless drawnow is called each iteration, making it faster. With nexttile, the figure updates immediately for each tile, slowing down the process. Using drawnow limitrate helps but isn’t ideal.
Question:Is there a way to manually control and delay drawing with nexttile, similar to how subplot behaves, to improve plotting performance?Problem:When using subplot in a loop, MATLAB only updates the figure at the end, unless drawnow is called each iteration, making it faster. With nexttile, the figure updates immediately for each tile, slowing down the process. Using drawnow limitrate helps but isn’t ideal.
Question:Is there a way to manually control and delay drawing with nexttile, similar to how subplot behaves, to improve plotting performance? Problem:When using subplot in a loop, MATLAB only updates the figure at the end, unless drawnow is called each iteration, making it faster. With nexttile, the figure updates immediately for each tile, slowing down the process. Using drawnow limitrate helps but isn’t ideal.
Question:Is there a way to manually control and delay drawing with nexttile, similar to how subplot behaves, to improve plotting performance? nexttile, drawnow, subplot MATLAB Answers — New Questions
How can I find the maximum frequency component of an audio signal? I have used the following code so please tell me how can I point out the max freq component by the graph of abs(xfft)? If there is any other way to find it, do share it. Thanks!
[y Fs]=wavread(filename);
xfft=fft(y);
plot(abs(xfft));[y Fs]=wavread(filename);
xfft=fft(y);
plot(abs(xfft)); [y Fs]=wavread(filename);
xfft=fft(y);
plot(abs(xfft)); maximum frequency component MATLAB Answers — New Questions
code imported from app designer in .m reimported in .mlapp
hello i have a problemme, i developped an app in app designer and to use the code in a docment i copied all the app code into the editor to publish it. but do to unfurtunate events i lost the .mlapp file and only have the .m code so i mean it work i still have the app but i dont know if there is a way to input the code into app designerhello i have a problemme, i developped an app in app designer and to use the code in a docment i copied all the app code into the editor to publish it. but do to unfurtunate events i lost the .mlapp file and only have the .m code so i mean it work i still have the app but i dont know if there is a way to input the code into app designer hello i have a problemme, i developped an app in app designer and to use the code in a docment i copied all the app code into the editor to publish it. but do to unfurtunate events i lost the .mlapp file and only have the .m code so i mean it work i still have the app but i dont know if there is a way to input the code into app designer appdesigner, code, import, export MATLAB Answers — New Questions
SoC Builder: “Build software application” step fails due to error regarding ‘iio.h’ or ‘aarch64-linux-gnu-gcc’
We encounter the error as
https://ww2.mathworks.cn/matlabcentral/answers/1632125-soc-builder-build-software-application-step-fails-due-to-error-regarding-iio-h-or-aarch64-linu
and We sure that all the 3rd support packages are install in a win10 system, the mathworks is R2023B, the moduel is soc_hwsw_stream_top, hardware board aim is zcu102
maybe is due to too long path in windows system, Does there has a same issure in linux system?We encounter the error as
https://ww2.mathworks.cn/matlabcentral/answers/1632125-soc-builder-build-software-application-step-fails-due-to-error-regarding-iio-h-or-aarch64-linu
and We sure that all the 3rd support packages are install in a win10 system, the mathworks is R2023B, the moduel is soc_hwsw_stream_top, hardware board aim is zcu102
maybe is due to too long path in windows system, Does there has a same issure in linux system? We encounter the error as
https://ww2.mathworks.cn/matlabcentral/answers/1632125-soc-builder-build-software-application-step-fails-due-to-error-regarding-iio-h-or-aarch64-linu
and We sure that all the 3rd support packages are install in a win10 system, the mathworks is R2023B, the moduel is soc_hwsw_stream_top, hardware board aim is zcu102
maybe is due to too long path in windows system, Does there has a same issure in linux system? soc blockset, simulink MATLAB Answers — New Questions
I want to go through the code to find out where variables are used in the model and what functions are available.
I want to go through the code to find out where variables are used in the model and what functions are available. Equivalent to the following operation is implemented using code.I want to go through the code to find out where variables are used in the model and what functions are available. Equivalent to the following operation is implemented using code. I want to go through the code to find out where variables are used in the model and what functions are available. Equivalent to the following operation is implemented using code. simulink, .m, data MATLAB Answers — New Questions
Please tell us about feature selection and enlighten us.
Please tell us about feature selection and enlighten us.
One of the built-in feature selection algorithms, out-of-bag for random forests in classification trees, was employed to select features for machine learning (Selecting predictors for random forests – MATLAB & Simulink – MathWorks Japan) to indicate the importance of the predictors.
A histogram was created and sorted in order of the predictors’ values, and from the histogram, the predictors were fed into the machine learning model by identifying where the importance of the predictors differed significantly and selecting only those that were greater than or equal to the histogram.
Here, can we consider the method of finding the histograms, the parts that differ significantly visually, and selecting thresholds as one of the various options for narrowing down the number of features?
We would be very grateful if you could provide us with some guidance.
Thank you very much in advance.Please tell us about feature selection and enlighten us.
One of the built-in feature selection algorithms, out-of-bag for random forests in classification trees, was employed to select features for machine learning (Selecting predictors for random forests – MATLAB & Simulink – MathWorks Japan) to indicate the importance of the predictors.
A histogram was created and sorted in order of the predictors’ values, and from the histogram, the predictors were fed into the machine learning model by identifying where the importance of the predictors differed significantly and selecting only those that were greater than or equal to the histogram.
Here, can we consider the method of finding the histograms, the parts that differ significantly visually, and selecting thresholds as one of the various options for narrowing down the number of features?
We would be very grateful if you could provide us with some guidance.
Thank you very much in advance. Please tell us about feature selection and enlighten us.
One of the built-in feature selection algorithms, out-of-bag for random forests in classification trees, was employed to select features for machine learning (Selecting predictors for random forests – MATLAB & Simulink – MathWorks Japan) to indicate the importance of the predictors.
A histogram was created and sorted in order of the predictors’ values, and from the histogram, the predictors were fed into the machine learning model by identifying where the importance of the predictors differed significantly and selecting only those that were greater than or equal to the histogram.
Here, can we consider the method of finding the histograms, the parts that differ significantly visually, and selecting thresholds as one of the various options for narrowing down the number of features?
We would be very grateful if you could provide us with some guidance.
Thank you very much in advance. t feature selection MATLAB Answers — New Questions
opts = detectImportOptions Pass method when there is no variable Naming when reading more than 100 files
Background: Using opts = detectImportOptions, some file data are missing out of more than 100 files
Purpose: How to write after skipping the 25th file VariableName2 and skipping
path = pwd;
list = dir(path);
S = dir(fullfile(path, ‘*.csv’));
for k = 1:numel(S)
F = fullfile(S(k).folder,S(k).name);
opts = detectImportOptions(fullfile(S(k).folder,S(k).name),"VariableNamingRule","preserve",ImportErrorRule="omitrow",MissingRule="omitrow");
% There is no VariableName2 due to the omission of some file data among more than 100 files,
opts.SelectedVariableNames = {‘VariableName1’, ‘VariableName2’};
% Error occurs because there is no VariableName2
opts.MissingRule = ‘omitrow’;
T = readtable(F,opts,"ReadVariableNames",true);
filename = getfield(S,{k},’name’);
writematrix(filename,’naming.csv’,’Delimiter’,’,’,’QuoteStrings’,’all’,’WriteMode’,’append’);
writematrix(matrix_data,’myData.csv’,’Delimiter’,’,’,’QuoteStrings’,’all’,’WriteMode’,’append’);
endBackground: Using opts = detectImportOptions, some file data are missing out of more than 100 files
Purpose: How to write after skipping the 25th file VariableName2 and skipping
path = pwd;
list = dir(path);
S = dir(fullfile(path, ‘*.csv’));
for k = 1:numel(S)
F = fullfile(S(k).folder,S(k).name);
opts = detectImportOptions(fullfile(S(k).folder,S(k).name),"VariableNamingRule","preserve",ImportErrorRule="omitrow",MissingRule="omitrow");
% There is no VariableName2 due to the omission of some file data among more than 100 files,
opts.SelectedVariableNames = {‘VariableName1’, ‘VariableName2’};
% Error occurs because there is no VariableName2
opts.MissingRule = ‘omitrow’;
T = readtable(F,opts,"ReadVariableNames",true);
filename = getfield(S,{k},’name’);
writematrix(filename,’naming.csv’,’Delimiter’,’,’,’QuoteStrings’,’all’,’WriteMode’,’append’);
writematrix(matrix_data,’myData.csv’,’Delimiter’,’,’,’QuoteStrings’,’all’,’WriteMode’,’append’);
end Background: Using opts = detectImportOptions, some file data are missing out of more than 100 files
Purpose: How to write after skipping the 25th file VariableName2 and skipping
path = pwd;
list = dir(path);
S = dir(fullfile(path, ‘*.csv’));
for k = 1:numel(S)
F = fullfile(S(k).folder,S(k).name);
opts = detectImportOptions(fullfile(S(k).folder,S(k).name),"VariableNamingRule","preserve",ImportErrorRule="omitrow",MissingRule="omitrow");
% There is no VariableName2 due to the omission of some file data among more than 100 files,
opts.SelectedVariableNames = {‘VariableName1’, ‘VariableName2’};
% Error occurs because there is no VariableName2
opts.MissingRule = ‘omitrow’;
T = readtable(F,opts,"ReadVariableNames",true);
filename = getfield(S,{k},’name’);
writematrix(filename,’naming.csv’,’Delimiter’,’,’,’QuoteStrings’,’all’,’WriteMode’,’append’);
writematrix(matrix_data,’myData.csv’,’Delimiter’,’,’,’QuoteStrings’,’all’,’WriteMode’,’append’);
end opts = detectimportoptions, variablenaming, pass MATLAB Answers — New Questions
Matlab code for cantilever beam with point load at free end
# * Item one
# * Item two
<</matlabcentral/answers/uploaded_files/1722796/17193804043506861656129014444335.jpg>># * Item one
# * Item two
<</matlabcentral/answers/uploaded_files/1722796/17193804043506861656129014444335.jpg>> # * Item one
# * Item two
<</matlabcentral/answers/uploaded_files/1722796/17193804043506861656129014444335.jpg>> for fast ans MATLAB Answers — New Questions
find a maximum for defined months and between a given times
Hi guys,
i try to find a maximum value in a given year timeserie. the seeked maximum for the months (jan, feb and december) have a given time range and for the months (Sept, oct and November) a different range. (see duration time in the code)
i tried my code but its not working. i guess i have a mistake in integrating the duration indexing and the logical check for the months.
any held how to correct the code will be nice.
thank you
filename=’out.xlsx’;
out=importdata(filename);
out=readtable(‘out’);
M=month(out.Zeit(2:end));
ax=(M==1 | M==2 | M==12); % if month is januar, feb or december than ax=1
bx=(M==9 | M==10 | M==11);% if month is sept, oct or november than bx=1
tod=timeofday(out.Zeit(2:end));
p1w=(duration(’07:45:00′):minutes(15):duration(’16:15:00′))’; % fist time range we look for a max for ax
p2w=(duration(’16:45:00′):minutes(15):duration(’18:30:00′))’; % second time range we look for a max for ax
p3h=(duration(’07:45:00′):minutes(15):duration(’18:00:00′))’; % fist time range we look for a max for bx
ip1w=find((tod >= p1w(1) & tod <= p1w(end)) | (tod >= p2w(1) & tod <= p2w(end))); % look for the index of p1w and p2w
ip2h=find((tod >= p3h(1) & tod <= p3h(end))); % look for the index of p3h
maxW=max(out.SV(ax(ip1w)==1)); % max if conditions of time range and month are filled for ax
maxH=max(out.SV(bx(ip2h)==1)); % max if conditions of time range and month are filled for bx
maxHLZ=max(maxW,maxH);Hi guys,
i try to find a maximum value in a given year timeserie. the seeked maximum for the months (jan, feb and december) have a given time range and for the months (Sept, oct and November) a different range. (see duration time in the code)
i tried my code but its not working. i guess i have a mistake in integrating the duration indexing and the logical check for the months.
any held how to correct the code will be nice.
thank you
filename=’out.xlsx’;
out=importdata(filename);
out=readtable(‘out’);
M=month(out.Zeit(2:end));
ax=(M==1 | M==2 | M==12); % if month is januar, feb or december than ax=1
bx=(M==9 | M==10 | M==11);% if month is sept, oct or november than bx=1
tod=timeofday(out.Zeit(2:end));
p1w=(duration(’07:45:00′):minutes(15):duration(’16:15:00′))’; % fist time range we look for a max for ax
p2w=(duration(’16:45:00′):minutes(15):duration(’18:30:00′))’; % second time range we look for a max for ax
p3h=(duration(’07:45:00′):minutes(15):duration(’18:00:00′))’; % fist time range we look for a max for bx
ip1w=find((tod >= p1w(1) & tod <= p1w(end)) | (tod >= p2w(1) & tod <= p2w(end))); % look for the index of p1w and p2w
ip2h=find((tod >= p3h(1) & tod <= p3h(end))); % look for the index of p3h
maxW=max(out.SV(ax(ip1w)==1)); % max if conditions of time range and month are filled for ax
maxH=max(out.SV(bx(ip2h)==1)); % max if conditions of time range and month are filled for bx
maxHLZ=max(maxW,maxH); Hi guys,
i try to find a maximum value in a given year timeserie. the seeked maximum for the months (jan, feb and december) have a given time range and for the months (Sept, oct and November) a different range. (see duration time in the code)
i tried my code but its not working. i guess i have a mistake in integrating the duration indexing and the logical check for the months.
any held how to correct the code will be nice.
thank you
filename=’out.xlsx’;
out=importdata(filename);
out=readtable(‘out’);
M=month(out.Zeit(2:end));
ax=(M==1 | M==2 | M==12); % if month is januar, feb or december than ax=1
bx=(M==9 | M==10 | M==11);% if month is sept, oct or november than bx=1
tod=timeofday(out.Zeit(2:end));
p1w=(duration(’07:45:00′):minutes(15):duration(’16:15:00′))’; % fist time range we look for a max for ax
p2w=(duration(’16:45:00′):minutes(15):duration(’18:30:00′))’; % second time range we look for a max for ax
p3h=(duration(’07:45:00′):minutes(15):duration(’18:00:00′))’; % fist time range we look for a max for bx
ip1w=find((tod >= p1w(1) & tod <= p1w(end)) | (tod >= p2w(1) & tod <= p2w(end))); % look for the index of p1w and p2w
ip2h=find((tod >= p3h(1) & tod <= p3h(end))); % look for the index of p3h
maxW=max(out.SV(ax(ip1w)==1)); % max if conditions of time range and month are filled for ax
maxH=max(out.SV(bx(ip2h)==1)); % max if conditions of time range and month are filled for bx
maxHLZ=max(maxW,maxH); find max value in timerange MATLAB Answers — New Questions
Simulation of two phase fluid with Simscape – pressure behavior unexplicable
I simulate the attached system, using the two phase fluid and the self crated properties block with the properties of hydrogen. The tank has 7 bar, the reservoir has 2 bar. Imidiatelly after starting simulation, the pressure in the tank drops down to the level of the reservoir (2 bar). That makes logical for me so sence. When I have a pressure tank with a small exit (area: 1e-4 m²) the pressure in the tank should go down slowly. The level is also plottet, where one can see that even the tank goes empty slowly.
So waht could be my mistake here?I simulate the attached system, using the two phase fluid and the self crated properties block with the properties of hydrogen. The tank has 7 bar, the reservoir has 2 bar. Imidiatelly after starting simulation, the pressure in the tank drops down to the level of the reservoir (2 bar). That makes logical for me so sence. When I have a pressure tank with a small exit (area: 1e-4 m²) the pressure in the tank should go down slowly. The level is also plottet, where one can see that even the tank goes empty slowly.
So waht could be my mistake here? I simulate the attached system, using the two phase fluid and the self crated properties block with the properties of hydrogen. The tank has 7 bar, the reservoir has 2 bar. Imidiatelly after starting simulation, the pressure in the tank drops down to the level of the reservoir (2 bar). That makes logical for me so sence. When I have a pressure tank with a small exit (area: 1e-4 m²) the pressure in the tank should go down slowly. The level is also plottet, where one can see that even the tank goes empty slowly.
So waht could be my mistake here? two-phase-fluid, simscape, hydrogen, liquid hydrogen, pressure simulation MATLAB Answers — New Questions
The encoder counter and speed display are wrong
I’m using R2024a and Embedded Encoder Support Package for Infineon AURIX TC3x Microcontrollers inside the add on.
And using the encoder block and running in KIT_A2G_TC387_5V TFT board ,and use scope to observe the output.
The results and settings are as shown below.
1.hardware setting
2-1 encoder setting
2-2 encoder setting
3.scope setting
4.result
from top to the bottom is count,direction,and rad/s.I’m using R2024a and Embedded Encoder Support Package for Infineon AURIX TC3x Microcontrollers inside the add on.
And using the encoder block and running in KIT_A2G_TC387_5V TFT board ,and use scope to observe the output.
The results and settings are as shown below.
1.hardware setting
2-1 encoder setting
2-2 encoder setting
3.scope setting
4.result
from top to the bottom is count,direction,and rad/s. I’m using R2024a and Embedded Encoder Support Package for Infineon AURIX TC3x Microcontrollers inside the add on.
And using the encoder block and running in KIT_A2G_TC387_5V TFT board ,and use scope to observe the output.
The results and settings are as shown below.
1.hardware setting
2-1 encoder setting
2-2 encoder setting
3.scope setting
4.result
from top to the bottom is count,direction,and rad/s. encoder MATLAB Answers — New Questions
How to disable position independent code (PIC) in CMake code generation for PIL?
Hi. I’m trying to create a PIL connectivity configuration for a board with a Cortex-M3 processor, using the "modern" method of target package and CMake. The code that is being generated is PIC, and I need it to not be PIC because I really do not want to write a bootloader. I simply want to run a PIL simulation and confirm that everything is calculated correctly. Handling a PIE is wasted effort.
However, I cannot see any way to disable PIC. In the internal files of the coder toolbox, file "writeCMakeLists.m" which generates the CMakeLists.txt from what I can see, the following is written:
% Always compile using position independent code
% Static libraries built without PIC might cause a failure when linked by a shared library
% See g2329017
cmakeTarget.Properties(end+1) = coder.make.internal.cmake.NameValuePair(‘PREFIX’, ‘""’);
cmakeTarget.Properties(end+1) = coder.make.internal.cmake.NameValuePair(‘POSITION_INDEPENDENT_CODE’, ‘ON’);
So from that I take that PIC is forced on the generated code. I would like to know if there is any way to disable PIC, or, as a last resort, if modifying the above Matlab file to disable PIC would have any unintended consequences (this is a bit complicated since I don’t have admin at work to modify program files, but as a last resort can be done).
Thank you.Hi. I’m trying to create a PIL connectivity configuration for a board with a Cortex-M3 processor, using the "modern" method of target package and CMake. The code that is being generated is PIC, and I need it to not be PIC because I really do not want to write a bootloader. I simply want to run a PIL simulation and confirm that everything is calculated correctly. Handling a PIE is wasted effort.
However, I cannot see any way to disable PIC. In the internal files of the coder toolbox, file "writeCMakeLists.m" which generates the CMakeLists.txt from what I can see, the following is written:
% Always compile using position independent code
% Static libraries built without PIC might cause a failure when linked by a shared library
% See g2329017
cmakeTarget.Properties(end+1) = coder.make.internal.cmake.NameValuePair(‘PREFIX’, ‘""’);
cmakeTarget.Properties(end+1) = coder.make.internal.cmake.NameValuePair(‘POSITION_INDEPENDENT_CODE’, ‘ON’);
So from that I take that PIC is forced on the generated code. I would like to know if there is any way to disable PIC, or, as a last resort, if modifying the above Matlab file to disable PIC would have any unintended consequences (this is a bit complicated since I don’t have admin at work to modify program files, but as a last resort can be done).
Thank you. Hi. I’m trying to create a PIL connectivity configuration for a board with a Cortex-M3 processor, using the "modern" method of target package and CMake. The code that is being generated is PIC, and I need it to not be PIC because I really do not want to write a bootloader. I simply want to run a PIL simulation and confirm that everything is calculated correctly. Handling a PIE is wasted effort.
However, I cannot see any way to disable PIC. In the internal files of the coder toolbox, file "writeCMakeLists.m" which generates the CMakeLists.txt from what I can see, the following is written:
% Always compile using position independent code
% Static libraries built without PIC might cause a failure when linked by a shared library
% See g2329017
cmakeTarget.Properties(end+1) = coder.make.internal.cmake.NameValuePair(‘PREFIX’, ‘""’);
cmakeTarget.Properties(end+1) = coder.make.internal.cmake.NameValuePair(‘POSITION_INDEPENDENT_CODE’, ‘ON’);
So from that I take that PIC is forced on the generated code. I would like to know if there is any way to disable PIC, or, as a last resort, if modifying the above Matlab file to disable PIC would have any unintended consequences (this is a bit complicated since I don’t have admin at work to modify program files, but as a last resort can be done).
Thank you. code generation, pil, cmake MATLAB Answers — New Questions
DATCOM Forces and Moments Block Control Surface Deflection Issues
I am a bit uncertain abou the proper use of the control surface delta block for the DATCOM forces and moments block in Simulink.
I noticed that when using import DATCOM with both the GRNDHT namelist for ground effect and the DELTA namelist for control surface deflections, the static stability derivatives are missing the values at various deflections at free-air ground height. To address this, I copied and filled in all the deflection values (6th index) coping the first value in the 6th index to fill in the free-air paraemters across all deflections. My assumption was that the DATCOM forces and moments block would use these to compute the forces and moments with no deflection, then add the control surface contributions seperately using dcm_sym, dcl_sym etc. However I only see a response to control surface delta inputs when the ground height signal is within the ground effect range, indicating that perhaps the DATCOM forces and moments block is not adding the dcm_sym, dcl_sym […] contributions and only finding coefficients from the cl, cl […] tables.
My question is, does the DATCOM forces and moments block read the incremental lift coefficients dcm_sym, dcl_sym […], or does it only apply the cl, cm […] coefficients for the current flight conditions, and are you supposed to manually apply aerdynamic coefficients using the aerodynamic forces and moments to account for forces and moments induced by the control surfaces?
Lastly, the units for the delta signal in Simulink state rad/s, I presume this is just a typo?
If anyone has any experience adding control surface contributions to a DATCOM simulink model, I would greatly appredicate your assistance!I am a bit uncertain abou the proper use of the control surface delta block for the DATCOM forces and moments block in Simulink.
I noticed that when using import DATCOM with both the GRNDHT namelist for ground effect and the DELTA namelist for control surface deflections, the static stability derivatives are missing the values at various deflections at free-air ground height. To address this, I copied and filled in all the deflection values (6th index) coping the first value in the 6th index to fill in the free-air paraemters across all deflections. My assumption was that the DATCOM forces and moments block would use these to compute the forces and moments with no deflection, then add the control surface contributions seperately using dcm_sym, dcl_sym etc. However I only see a response to control surface delta inputs when the ground height signal is within the ground effect range, indicating that perhaps the DATCOM forces and moments block is not adding the dcm_sym, dcl_sym […] contributions and only finding coefficients from the cl, cl […] tables.
My question is, does the DATCOM forces and moments block read the incremental lift coefficients dcm_sym, dcl_sym […], or does it only apply the cl, cm […] coefficients for the current flight conditions, and are you supposed to manually apply aerdynamic coefficients using the aerodynamic forces and moments to account for forces and moments induced by the control surfaces?
Lastly, the units for the delta signal in Simulink state rad/s, I presume this is just a typo?
If anyone has any experience adding control surface contributions to a DATCOM simulink model, I would greatly appredicate your assistance! I am a bit uncertain abou the proper use of the control surface delta block for the DATCOM forces and moments block in Simulink.
I noticed that when using import DATCOM with both the GRNDHT namelist for ground effect and the DELTA namelist for control surface deflections, the static stability derivatives are missing the values at various deflections at free-air ground height. To address this, I copied and filled in all the deflection values (6th index) coping the first value in the 6th index to fill in the free-air paraemters across all deflections. My assumption was that the DATCOM forces and moments block would use these to compute the forces and moments with no deflection, then add the control surface contributions seperately using dcm_sym, dcl_sym etc. However I only see a response to control surface delta inputs when the ground height signal is within the ground effect range, indicating that perhaps the DATCOM forces and moments block is not adding the dcm_sym, dcl_sym […] contributions and only finding coefficients from the cl, cl […] tables.
My question is, does the DATCOM forces and moments block read the incremental lift coefficients dcm_sym, dcl_sym […], or does it only apply the cl, cm […] coefficients for the current flight conditions, and are you supposed to manually apply aerdynamic coefficients using the aerodynamic forces and moments to account for forces and moments induced by the control surfaces?
Lastly, the units for the delta signal in Simulink state rad/s, I presume this is just a typo?
If anyone has any experience adding control surface contributions to a DATCOM simulink model, I would greatly appredicate your assistance! aerospace blocket, simulink, datcom, datcomimport, datcom forces and moments MATLAB Answers — New Questions
Slow array of structure updating in saving variables in app designer
I am working on developing an application in app designer for doing a bunch of fits and saving the results in an array of structures, where each structure has various types of fields about the fit results. When I save the file, I update the array with the fit_info structure each fit, and append to the array of structures for each save step. I eventually will be doing 89×13 fits. But, each cycle gets slower and slower, so it is impractically slow by about 30 fits. I looked into saving a separate variable for each fit, by dynamically naming the variables, i.e., fit_info_1_1, fit_info_1_2, etc., but I know this is bad programming practice. Does anyone have any suggestions?
function SaveFitButtonPushed(app, event)
data_source=string(app.TextArea.Value);
filename=strcat("fit_results_",data_source);
if isfile(filename)
matObj=matfile(filename,’Writable’,true);
matObj.fit_info_a(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_1;
else
fit_info_a(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_1;
save (filename,’fit_info_a’,’-v7.3′);
end
if ~isempty(app.fit_info_2.pm95)
data_source=string(app.TextArea.Value);
filename=strcat("fit_results_2_",data_source);
if isfile(filename)
matObj=matfile(filename,’Writable’,true);
matObj.fit_info_b(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_2;
else
fit_info_b(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_2;
save (filename,’fit_info_b’,’-v7.3′);
end
end
app.k_refS_1refS_2refTextArea.Value=”;
app.s_ETextArea.Value=”;
app.k_refS_1refS_2refTextArea_2.Value=”;
app.s_ETextArea_2.Value=”;
app.phi_refEditField.Value=30;
app.phi_refEditField_2.Value=30;
str='[]’;
app.OmitPointsEditField.Value=str;
app.OmitPointsEditField_2.Value=str;
endI am working on developing an application in app designer for doing a bunch of fits and saving the results in an array of structures, where each structure has various types of fields about the fit results. When I save the file, I update the array with the fit_info structure each fit, and append to the array of structures for each save step. I eventually will be doing 89×13 fits. But, each cycle gets slower and slower, so it is impractically slow by about 30 fits. I looked into saving a separate variable for each fit, by dynamically naming the variables, i.e., fit_info_1_1, fit_info_1_2, etc., but I know this is bad programming practice. Does anyone have any suggestions?
function SaveFitButtonPushed(app, event)
data_source=string(app.TextArea.Value);
filename=strcat("fit_results_",data_source);
if isfile(filename)
matObj=matfile(filename,’Writable’,true);
matObj.fit_info_a(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_1;
else
fit_info_a(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_1;
save (filename,’fit_info_a’,’-v7.3′);
end
if ~isempty(app.fit_info_2.pm95)
data_source=string(app.TextArea.Value);
filename=strcat("fit_results_2_",data_source);
if isfile(filename)
matObj=matfile(filename,’Writable’,true);
matObj.fit_info_b(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_2;
else
fit_info_b(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_2;
save (filename,’fit_info_b’,’-v7.3′);
end
end
app.k_refS_1refS_2refTextArea.Value=”;
app.s_ETextArea.Value=”;
app.k_refS_1refS_2refTextArea_2.Value=”;
app.s_ETextArea_2.Value=”;
app.phi_refEditField.Value=30;
app.phi_refEditField_2.Value=30;
str='[]’;
app.OmitPointsEditField.Value=str;
app.OmitPointsEditField_2.Value=str;
end I am working on developing an application in app designer for doing a bunch of fits and saving the results in an array of structures, where each structure has various types of fields about the fit results. When I save the file, I update the array with the fit_info structure each fit, and append to the array of structures for each save step. I eventually will be doing 89×13 fits. But, each cycle gets slower and slower, so it is impractically slow by about 30 fits. I looked into saving a separate variable for each fit, by dynamically naming the variables, i.e., fit_info_1_1, fit_info_1_2, etc., but I know this is bad programming practice. Does anyone have any suggestions?
function SaveFitButtonPushed(app, event)
data_source=string(app.TextArea.Value);
filename=strcat("fit_results_",data_source);
if isfile(filename)
matObj=matfile(filename,’Writable’,true);
matObj.fit_info_a(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_1;
else
fit_info_a(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_1;
save (filename,’fit_info_a’,’-v7.3′);
end
if ~isempty(app.fit_info_2.pm95)
data_source=string(app.TextArea.Value);
filename=strcat("fit_results_2_",data_source);
if isfile(filename)
matObj=matfile(filename,’Writable’,true);
matObj.fit_info_b(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_2;
else
fit_info_b(app.ColumnEditField.Value,app.CompoundEditField.Value)=app.fit_info_2;
save (filename,’fit_info_b’,’-v7.3′);
end
end
app.k_refS_1refS_2refTextArea.Value=”;
app.s_ETextArea.Value=”;
app.k_refS_1refS_2refTextArea_2.Value=”;
app.s_ETextArea_2.Value=”;
app.phi_refEditField.Value=30;
app.phi_refEditField_2.Value=30;
str='[]’;
app.OmitPointsEditField.Value=str;
app.OmitPointsEditField_2.Value=str;
end appdesigner, save, appending to file, array of structures MATLAB Answers — New Questions
Three Phase dynamic load
Guys:
I´m an electric engineering student and I´m trying to create a IEEE-33 distribuion line topology with simulink as shown in figure 1. Source voltage is 138Kv and transformer reduces to 13.8 Kv.
<</matlabcentral/answers/uploaded_files/27736/topology.png>>
Instead of using fixed loads, I´m using three phase dynamic load with external control as show in figure 2.
<</matlabcentral/answers/uploaded_files/27737/model.png>>
I´m facing a problem with with a very small model with three loads. Voltages and currents that are associated to these load models as show in figure 3 have strange behaviours. Results are like numeric noise. I was suspecting that the problem could be related with solve model but I tried fixed step and variable step with the same results.
<</matlabcentral/answers/uploaded_files/27738/results.png>>
Can anyone explain to me what is going on with the model and how to fix it ?
Sincerely,
Andre NudelGuys:
I´m an electric engineering student and I´m trying to create a IEEE-33 distribuion line topology with simulink as shown in figure 1. Source voltage is 138Kv and transformer reduces to 13.8 Kv.
<</matlabcentral/answers/uploaded_files/27736/topology.png>>
Instead of using fixed loads, I´m using three phase dynamic load with external control as show in figure 2.
<</matlabcentral/answers/uploaded_files/27737/model.png>>
I´m facing a problem with with a very small model with three loads. Voltages and currents that are associated to these load models as show in figure 3 have strange behaviours. Results are like numeric noise. I was suspecting that the problem could be related with solve model but I tried fixed step and variable step with the same results.
<</matlabcentral/answers/uploaded_files/27738/results.png>>
Can anyone explain to me what is going on with the model and how to fix it ?
Sincerely,
Andre Nudel Guys:
I´m an electric engineering student and I´m trying to create a IEEE-33 distribuion line topology with simulink as shown in figure 1. Source voltage is 138Kv and transformer reduces to 13.8 Kv.
<</matlabcentral/answers/uploaded_files/27736/topology.png>>
Instead of using fixed loads, I´m using three phase dynamic load with external control as show in figure 2.
<</matlabcentral/answers/uploaded_files/27737/model.png>>
I´m facing a problem with with a very small model with three loads. Voltages and currents that are associated to these load models as show in figure 3 have strange behaviours. Results are like numeric noise. I was suspecting that the problem could be related with solve model but I tried fixed step and variable step with the same results.
<</matlabcentral/answers/uploaded_files/27738/results.png>>
Can anyone explain to me what is going on with the model and how to fix it ?
Sincerely,
Andre Nudel threephasedynamicload MATLAB Answers — New Questions
Matlab doesn´t respect the UI Scale of my OS
I’m encountering an issue with font size in MATLAB on my Linux system. During the installation of MATLAB, both the installation window and the software interface displayed very small fonts. Despite adjusting the DPI setting of my operating system (currently set to 200%), MATLAB seems to be fixed at a 100% scale, regardless of whether I change the scale to 200% or 300%.
I’m using linux mint 21.3I’m encountering an issue with font size in MATLAB on my Linux system. During the installation of MATLAB, both the installation window and the software interface displayed very small fonts. Despite adjusting the DPI setting of my operating system (currently set to 200%), MATLAB seems to be fixed at a 100% scale, regardless of whether I change the scale to 200% or 300%.
I’m using linux mint 21.3 I’m encountering an issue with font size in MATLAB on my Linux system. During the installation of MATLAB, both the installation window and the software interface displayed very small fonts. Despite adjusting the DPI setting of my operating system (currently set to 200%), MATLAB seems to be fixed at a 100% scale, regardless of whether I change the scale to 200% or 300%.
I’m using linux mint 21.3 linux, graphics, installation, matlab gui MATLAB Answers — New Questions
Retrieving incremental regression kernel trained model
How can I retrieve the incremental regression kernel trained model?: the equation that predict function uses to predict output.How can I retrieve the incremental regression kernel trained model?: the equation that predict function uses to predict output. How can I retrieve the incremental regression kernel trained model?: the equation that predict function uses to predict output. regression, svm, random features expansion MATLAB Answers — New Questions
No classification layer in MATLAB Deep network designer
Hi,
I am trying to build an image classification network in MATLAB. I am using the inbuilt Deep Network Designer app. But in the end of the neural network, there is a classification layer which is totally missing. I designed the last network in March and at that time the layer was present but now it is missing. Attaching the screenshots for reference. Also the tabs to select the image ibrary and the training options are missing from the top.Hi,
I am trying to build an image classification network in MATLAB. I am using the inbuilt Deep Network Designer app. But in the end of the neural network, there is a classification layer which is totally missing. I designed the last network in March and at that time the layer was present but now it is missing. Attaching the screenshots for reference. Also the tabs to select the image ibrary and the training options are missing from the top. Hi,
I am trying to build an image classification network in MATLAB. I am using the inbuilt Deep Network Designer app. But in the end of the neural network, there is a classification layer which is totally missing. I designed the last network in March and at that time the layer was present but now it is missing. Attaching the screenshots for reference. Also the tabs to select the image ibrary and the training options are missing from the top. deep learning, neural network, classification MATLAB Answers — New Questions