Tag Archives: matlab
regionZoomInteraction only works the first time, bug?
So I noticed this very weird thing which I think is a bug…
When the switch is on by default, the regionZoom works as intended. Then I turn it off, and rotate and zoom starts to work. And turn it on again, now the regionZoom cursor shows, you can select the area, but it doesn’t actually zoom.
It looks like regionZoom only works in the first instance. Second time onwards it doesn’t work. ZoomInteraction still works and this issue only applies to regionZoom.
Any thoughts? Can I add regionZoom as a standard option in the axes toolbar? That would do the job too.
function ButtonPushed(app, event)
ax=app.UIAxes;
if app.Switch.Value == "Off"
ax.Interactions = [rotateInteraction zoomInteraction];
else
ax.Interactions = [regionZoomInteraction zoomInteraction] ;
endSo I noticed this very weird thing which I think is a bug…
When the switch is on by default, the regionZoom works as intended. Then I turn it off, and rotate and zoom starts to work. And turn it on again, now the regionZoom cursor shows, you can select the area, but it doesn’t actually zoom.
It looks like regionZoom only works in the first instance. Second time onwards it doesn’t work. ZoomInteraction still works and this issue only applies to regionZoom.
Any thoughts? Can I add regionZoom as a standard option in the axes toolbar? That would do the job too.
function ButtonPushed(app, event)
ax=app.UIAxes;
if app.Switch.Value == "Off"
ax.Interactions = [rotateInteraction zoomInteraction];
else
ax.Interactions = [regionZoomInteraction zoomInteraction] ;
end So I noticed this very weird thing which I think is a bug…
When the switch is on by default, the regionZoom works as intended. Then I turn it off, and rotate and zoom starts to work. And turn it on again, now the regionZoom cursor shows, you can select the area, but it doesn’t actually zoom.
It looks like regionZoom only works in the first instance. Second time onwards it doesn’t work. ZoomInteraction still works and this issue only applies to regionZoom.
Any thoughts? Can I add regionZoom as a standard option in the axes toolbar? That would do the job too.
function ButtonPushed(app, event)
ax=app.UIAxes;
if app.Switch.Value == "Off"
ax.Interactions = [rotateInteraction zoomInteraction];
else
ax.Interactions = [regionZoomInteraction zoomInteraction] ;
end 3d plots MATLAB Answers — New Questions
Replace FMU and reload it in the FMU block in Simulink
Hello everyone,
I have the following problem: I have added an FMU import block to my Simulink model and imported my FMU by specifying the path of the FMU. The simulation in Simulink with the FMU works so far. However, if I make changes in the external simulation software (I am not talking about parameters that I could change directly in Simulink) and replace the existing FMU in the Matlab path with a new one (with the same name), the FMU block in Simulink do not see the changes, even though they appear in the corresponding xml file. I can still simulate with the FMU, but changes in parameter values between the two FMU files are apparently not taken into account. The changes only take effect if I delete the existing FMU block in Simulink, create a new one and load the last FMU I created.
Are the parameters in the FMU block cached somewhere that the FMU block accesses? I have already tried to update the model, but it does not help.Is there any other way, some kind of reset command for the FMU Block, to reload the stored FMU? Since I am planning to automate the simulation, I would like to avoid having to delete the FMU Block and add a new one after each new FMU is created.
Many thanks in advance!Hello everyone,
I have the following problem: I have added an FMU import block to my Simulink model and imported my FMU by specifying the path of the FMU. The simulation in Simulink with the FMU works so far. However, if I make changes in the external simulation software (I am not talking about parameters that I could change directly in Simulink) and replace the existing FMU in the Matlab path with a new one (with the same name), the FMU block in Simulink do not see the changes, even though they appear in the corresponding xml file. I can still simulate with the FMU, but changes in parameter values between the two FMU files are apparently not taken into account. The changes only take effect if I delete the existing FMU block in Simulink, create a new one and load the last FMU I created.
Are the parameters in the FMU block cached somewhere that the FMU block accesses? I have already tried to update the model, but it does not help.Is there any other way, some kind of reset command for the FMU Block, to reload the stored FMU? Since I am planning to automate the simulation, I would like to avoid having to delete the FMU Block and add a new one after each new FMU is created.
Many thanks in advance! Hello everyone,
I have the following problem: I have added an FMU import block to my Simulink model and imported my FMU by specifying the path of the FMU. The simulation in Simulink with the FMU works so far. However, if I make changes in the external simulation software (I am not talking about parameters that I could change directly in Simulink) and replace the existing FMU in the Matlab path with a new one (with the same name), the FMU block in Simulink do not see the changes, even though they appear in the corresponding xml file. I can still simulate with the FMU, but changes in parameter values between the two FMU files are apparently not taken into account. The changes only take effect if I delete the existing FMU block in Simulink, create a new one and load the last FMU I created.
Are the parameters in the FMU block cached somewhere that the FMU block accesses? I have already tried to update the model, but it does not help.Is there any other way, some kind of reset command for the FMU Block, to reload the stored FMU? Since I am planning to automate the simulation, I would like to avoid having to delete the FMU Block and add a new one after each new FMU is created.
Many thanks in advance! fmu, fmu import MATLAB Answers — New Questions
Issues with SIL Implementation and CCS Integration for AM263P4 using MATLAB Simulink and Embedded Coder
I’m using an AM263P4 control card with MATLAB Simulink (R2024b Update 3) and the Embedded Coder Hardware Support Package for TI AM26x Processors (v24.2.0.12). I can successfully build and deploy to hardware, but unable to import the generated C code into Code Composer Studio (CCS). And the debug option is disabled, and I can’t run or debug for manually added generated code folder to workspace.
To bypass this, I attempted Software-in-the-Loop (SIL) implementation. The build succeeded after updating the build configuration to specify and including GPIO driver paths in Custom Code -> Include Directories. However, during simulation, I encounter undefined reference errors for GPIO functions (e.g., GPIO_setDirMode), suggesting missing or unlinked drivers required for simulation. I tried manually linking libraries, but the issue persists.
Error message:
build summary:
0 of 1 models built (1 models already up to date) Build duration: 0h 0m 3.6275s
Simulation
### Preparing to start SIL simulation … ### Using toolchain: MinGW64 | gmake (64-bit Windows) ### Creating ‘E:QsyncTestfrCCS1_ert_rtwsilTestfrCCS1.mk’ … ### Building ‘TestfrCCS1’: "$(MINGW_ROOT)mingw32-make.exe" -j 6 -l 6 -Oline -f TestfrCCS1.mk all
(…………..few more lines and then…….)
"### Creating standalone executable "./TestfrCCS1.exe" …" "C:PROGRA~3MATLABSUPPOR~1R2024b3P778C~1.INSMINGW_~1.INSbin/g++" -static -m64 -o ./TestfrCCS1.exe @TestfrCCS1.rsp -Wl,–start-group @TestfrCCS1_ref.rsp E:/Qsync/TestfrCCS1_ert_rtw/coderassumptions/pwslib/TestfrCCS1_ca.lib -Wl,–end-group -lws2_32 hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x243): undefined reference to `GPIO_setDirMode’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x261): undefined reference to `GPIO_setTrigType’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x286): undefined reference to `GPIO_bankIntrEnable’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x320): undefined reference to `GPIO_bankIntrDisable’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x33a): undefined reference to `GPIO_setTrigType’ collect2.exe: error: ld returned 1 exit status mingw32-make: *** [TestfrCCS1.mk:305: TestfrCCS1.exe] Error 1 E:QsyncTestfrCCS1_ert_rtwsil>echo The make command returned an error of 2 The make command returned an error of 2 E:QsyncTestfrCCS1_ert_rtwsil>exit /B 1
An error occurred while calling the SIL or PIL target connectivity implementation.
Caused by:
Error(s) encountered while building "TestfrCCS1"I’m using an AM263P4 control card with MATLAB Simulink (R2024b Update 3) and the Embedded Coder Hardware Support Package for TI AM26x Processors (v24.2.0.12). I can successfully build and deploy to hardware, but unable to import the generated C code into Code Composer Studio (CCS). And the debug option is disabled, and I can’t run or debug for manually added generated code folder to workspace.
To bypass this, I attempted Software-in-the-Loop (SIL) implementation. The build succeeded after updating the build configuration to specify and including GPIO driver paths in Custom Code -> Include Directories. However, during simulation, I encounter undefined reference errors for GPIO functions (e.g., GPIO_setDirMode), suggesting missing or unlinked drivers required for simulation. I tried manually linking libraries, but the issue persists.
Error message:
build summary:
0 of 1 models built (1 models already up to date) Build duration: 0h 0m 3.6275s
Simulation
### Preparing to start SIL simulation … ### Using toolchain: MinGW64 | gmake (64-bit Windows) ### Creating ‘E:QsyncTestfrCCS1_ert_rtwsilTestfrCCS1.mk’ … ### Building ‘TestfrCCS1’: "$(MINGW_ROOT)mingw32-make.exe" -j 6 -l 6 -Oline -f TestfrCCS1.mk all
(…………..few more lines and then…….)
"### Creating standalone executable "./TestfrCCS1.exe" …" "C:PROGRA~3MATLABSUPPOR~1R2024b3P778C~1.INSMINGW_~1.INSbin/g++" -static -m64 -o ./TestfrCCS1.exe @TestfrCCS1.rsp -Wl,–start-group @TestfrCCS1_ref.rsp E:/Qsync/TestfrCCS1_ert_rtw/coderassumptions/pwslib/TestfrCCS1_ca.lib -Wl,–end-group -lws2_32 hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x243): undefined reference to `GPIO_setDirMode’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x261): undefined reference to `GPIO_setTrigType’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x286): undefined reference to `GPIO_bankIntrEnable’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x320): undefined reference to `GPIO_bankIntrDisable’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x33a): undefined reference to `GPIO_setTrigType’ collect2.exe: error: ld returned 1 exit status mingw32-make: *** [TestfrCCS1.mk:305: TestfrCCS1.exe] Error 1 E:QsyncTestfrCCS1_ert_rtwsil>echo The make command returned an error of 2 The make command returned an error of 2 E:QsyncTestfrCCS1_ert_rtwsil>exit /B 1
An error occurred while calling the SIL or PIL target connectivity implementation.
Caused by:
Error(s) encountered while building "TestfrCCS1" I’m using an AM263P4 control card with MATLAB Simulink (R2024b Update 3) and the Embedded Coder Hardware Support Package for TI AM26x Processors (v24.2.0.12). I can successfully build and deploy to hardware, but unable to import the generated C code into Code Composer Studio (CCS). And the debug option is disabled, and I can’t run or debug for manually added generated code folder to workspace.
To bypass this, I attempted Software-in-the-Loop (SIL) implementation. The build succeeded after updating the build configuration to specify and including GPIO driver paths in Custom Code -> Include Directories. However, during simulation, I encounter undefined reference errors for GPIO functions (e.g., GPIO_setDirMode), suggesting missing or unlinked drivers required for simulation. I tried manually linking libraries, but the issue persists.
Error message:
build summary:
0 of 1 models built (1 models already up to date) Build duration: 0h 0m 3.6275s
Simulation
### Preparing to start SIL simulation … ### Using toolchain: MinGW64 | gmake (64-bit Windows) ### Creating ‘E:QsyncTestfrCCS1_ert_rtwsilTestfrCCS1.mk’ … ### Building ‘TestfrCCS1’: "$(MINGW_ROOT)mingw32-make.exe" -j 6 -l 6 -Oline -f TestfrCCS1.mk all
(…………..few more lines and then…….)
"### Creating standalone executable "./TestfrCCS1.exe" …" "C:PROGRA~3MATLABSUPPOR~1R2024b3P778C~1.INSMINGW_~1.INSbin/g++" -static -m64 -o ./TestfrCCS1.exe @TestfrCCS1.rsp -Wl,–start-group @TestfrCCS1_ref.rsp E:/Qsync/TestfrCCS1_ert_rtw/coderassumptions/pwslib/TestfrCCS1_ca.lib -Wl,–end-group -lws2_32 hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x243): undefined reference to `GPIO_setDirMode’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x261): undefined reference to `GPIO_setTrigType’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x286): undefined reference to `GPIO_bankIntrEnable’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x320): undefined reference to `GPIO_bankIntrDisable’ hostobj/MW_GPIOOUT.obj:MW_GPIOOUT.c:(.text+0x33a): undefined reference to `GPIO_setTrigType’ collect2.exe: error: ld returned 1 exit status mingw32-make: *** [TestfrCCS1.mk:305: TestfrCCS1.exe] Error 1 E:QsyncTestfrCCS1_ert_rtwsil>echo The make command returned an error of 2 The make command returned an error of 2 E:QsyncTestfrCCS1_ert_rtwsil>exit /B 1
An error occurred while calling the SIL or PIL target connectivity implementation.
Caused by:
Error(s) encountered while building "TestfrCCS1" simulink, sitara, embedded coder MATLAB Answers — New Questions
FOC PMSM with Hall Sensor Queries
Dear Community,
I am refering https://in.mathworks.com/help/mcb/gs/foc-pmsm-using-hall-sensor-example.html for my motor control application using FOC FOR IPMSM. I am stuck with below queries.
PI Controller: How to decide saturation upper(1) and lower(-1) limits values?
How to decide D-Q Limiter block saturation limit value?
PWM Duty cycle not changing after changing referance speed.
Wrap on overflow error. "Current Control/Input Scaling/Read_Sensor (sim)/Subsystem/Speed Measurement/PositionToCount’
Torque-speed characteristics: For my application V=60V, I=48A,Torque=20Nm. After updating motor parameters, I am not getting expected values on graph.(Attached snapshot for ref.)
mcb_getCharacteristics: Are values shown in graph are in PU_System units or SI units. Please clarify.
Thanks in Advance.
.Dear Community,
I am refering https://in.mathworks.com/help/mcb/gs/foc-pmsm-using-hall-sensor-example.html for my motor control application using FOC FOR IPMSM. I am stuck with below queries.
PI Controller: How to decide saturation upper(1) and lower(-1) limits values?
How to decide D-Q Limiter block saturation limit value?
PWM Duty cycle not changing after changing referance speed.
Wrap on overflow error. "Current Control/Input Scaling/Read_Sensor (sim)/Subsystem/Speed Measurement/PositionToCount’
Torque-speed characteristics: For my application V=60V, I=48A,Torque=20Nm. After updating motor parameters, I am not getting expected values on graph.(Attached snapshot for ref.)
mcb_getCharacteristics: Are values shown in graph are in PU_System units or SI units. Please clarify.
Thanks in Advance.
. Dear Community,
I am refering https://in.mathworks.com/help/mcb/gs/foc-pmsm-using-hall-sensor-example.html for my motor control application using FOC FOR IPMSM. I am stuck with below queries.
PI Controller: How to decide saturation upper(1) and lower(-1) limits values?
How to decide D-Q Limiter block saturation limit value?
PWM Duty cycle not changing after changing referance speed.
Wrap on overflow error. "Current Control/Input Scaling/Read_Sensor (sim)/Subsystem/Speed Measurement/PositionToCount’
Torque-speed characteristics: For my application V=60V, I=48A,Torque=20Nm. After updating motor parameters, I am not getting expected values on graph.(Attached snapshot for ref.)
mcb_getCharacteristics: Are values shown in graph are in PU_System units or SI units. Please clarify.
Thanks in Advance.
. foc, pmsm, pi controller, pwm duty cycle MATLAB Answers — New Questions
multivariate random numbers generation
How to generate multivariate random number normally distributed in simulink?
The mvnrnd generates two different set of vectors with mean=[0 0] variance=[0.001 0;0 0.001] and seed[ 0 0];
whereas in simulink random number generator block generates two random number vectors which are repeatable with same seed.How to generate multivariate random number normally distributed in simulink?
The mvnrnd generates two different set of vectors with mean=[0 0] variance=[0.001 0;0 0.001] and seed[ 0 0];
whereas in simulink random number generator block generates two random number vectors which are repeatable with same seed. How to generate multivariate random number normally distributed in simulink?
The mvnrnd generates two different set of vectors with mean=[0 0] variance=[0.001 0;0 0.001] and seed[ 0 0];
whereas in simulink random number generator block generates two random number vectors which are repeatable with same seed. random numbers MATLAB Answers — New Questions
how can i create (generate) the Loop to Access Subfields:
Dears,
I need your help. hocan I access the subfields within eps_G, where eps_G is a structure.
whos myirfs1
Name Size Bytes Class Attributes
myirfs1 1×1 374094 struct
%% disp(fieldnames(myirfs1))
>> disp(fieldnames(myirfs1))
{‘eps_CP’}
{‘eps_G’ }
{‘eps_T’ }
{‘eps_a’ }
{‘eps_nu’}
{‘eps_z’ }
% choose 1 or 2 below
shock_type = {‘eps_G’,’eps_nu’};
var_aux = {‘log_y’,’C’,’pi_ann’,’B_nominal’,’B’,’sp’,’i_ann’,’r_real_ann’,’P’};
var_aux2 = {‘log_y_eps_nu’,’C_eps_nu’,’pi_ann_eps_nu’,’B_nominal_eps_nu’,’B_eps_nu’,’sp_eps_nu’,’i_ann_eps_nu’,’r_real_ann_eps_nu’,’P_eps_nu’};
var_aux3 = {‘eps_G_log_y’,’eps_G_C’,’eps_G_pi_ann’,’eps_G_B_nominal’,’eps_G_B’,’eps_G_sp’,’eps_G_i_ann’,’eps_G_r_real_ann’,’eps_G_P’};
%Irfs of monetary and fiscal policy
irf_mon = struct();
irf_fisc = struct();
%% disp(fieldnames(myirfs1))
>> disp(fieldnames(myirfs1))
{‘eps_CP’}
{‘eps_G’ }
{‘eps_T’ }
{‘eps_a’ }
{‘eps_nu’}
{‘eps_z’ }
% when i run the following code it is unrecognized. can you suggest me what to do?
for i = 1:numel(var_aux)
irf_mon.(var_aux{i}) = [0,myirfs1(1).(var_aux3{i})]’;
irf_fisc.(var_aux{i}) = [0,myirfs1(1).(var_aux3{i})]’;
end
Unrecognized field name "log_y_eps_G".Dears,
I need your help. hocan I access the subfields within eps_G, where eps_G is a structure.
whos myirfs1
Name Size Bytes Class Attributes
myirfs1 1×1 374094 struct
%% disp(fieldnames(myirfs1))
>> disp(fieldnames(myirfs1))
{‘eps_CP’}
{‘eps_G’ }
{‘eps_T’ }
{‘eps_a’ }
{‘eps_nu’}
{‘eps_z’ }
% choose 1 or 2 below
shock_type = {‘eps_G’,’eps_nu’};
var_aux = {‘log_y’,’C’,’pi_ann’,’B_nominal’,’B’,’sp’,’i_ann’,’r_real_ann’,’P’};
var_aux2 = {‘log_y_eps_nu’,’C_eps_nu’,’pi_ann_eps_nu’,’B_nominal_eps_nu’,’B_eps_nu’,’sp_eps_nu’,’i_ann_eps_nu’,’r_real_ann_eps_nu’,’P_eps_nu’};
var_aux3 = {‘eps_G_log_y’,’eps_G_C’,’eps_G_pi_ann’,’eps_G_B_nominal’,’eps_G_B’,’eps_G_sp’,’eps_G_i_ann’,’eps_G_r_real_ann’,’eps_G_P’};
%Irfs of monetary and fiscal policy
irf_mon = struct();
irf_fisc = struct();
%% disp(fieldnames(myirfs1))
>> disp(fieldnames(myirfs1))
{‘eps_CP’}
{‘eps_G’ }
{‘eps_T’ }
{‘eps_a’ }
{‘eps_nu’}
{‘eps_z’ }
% when i run the following code it is unrecognized. can you suggest me what to do?
for i = 1:numel(var_aux)
irf_mon.(var_aux{i}) = [0,myirfs1(1).(var_aux3{i})]’;
irf_fisc.(var_aux{i}) = [0,myirfs1(1).(var_aux3{i})]’;
end
Unrecognized field name "log_y_eps_G". Dears,
I need your help. hocan I access the subfields within eps_G, where eps_G is a structure.
whos myirfs1
Name Size Bytes Class Attributes
myirfs1 1×1 374094 struct
%% disp(fieldnames(myirfs1))
>> disp(fieldnames(myirfs1))
{‘eps_CP’}
{‘eps_G’ }
{‘eps_T’ }
{‘eps_a’ }
{‘eps_nu’}
{‘eps_z’ }
% choose 1 or 2 below
shock_type = {‘eps_G’,’eps_nu’};
var_aux = {‘log_y’,’C’,’pi_ann’,’B_nominal’,’B’,’sp’,’i_ann’,’r_real_ann’,’P’};
var_aux2 = {‘log_y_eps_nu’,’C_eps_nu’,’pi_ann_eps_nu’,’B_nominal_eps_nu’,’B_eps_nu’,’sp_eps_nu’,’i_ann_eps_nu’,’r_real_ann_eps_nu’,’P_eps_nu’};
var_aux3 = {‘eps_G_log_y’,’eps_G_C’,’eps_G_pi_ann’,’eps_G_B_nominal’,’eps_G_B’,’eps_G_sp’,’eps_G_i_ann’,’eps_G_r_real_ann’,’eps_G_P’};
%Irfs of monetary and fiscal policy
irf_mon = struct();
irf_fisc = struct();
%% disp(fieldnames(myirfs1))
>> disp(fieldnames(myirfs1))
{‘eps_CP’}
{‘eps_G’ }
{‘eps_T’ }
{‘eps_a’ }
{‘eps_nu’}
{‘eps_z’ }
% when i run the following code it is unrecognized. can you suggest me what to do?
for i = 1:numel(var_aux)
irf_mon.(var_aux{i}) = [0,myirfs1(1).(var_aux3{i})]’;
irf_fisc.(var_aux{i}) = [0,myirfs1(1).(var_aux3{i})]’;
end
Unrecognized field name "log_y_eps_G". matlab coding ms dsge modelin MATLAB Answers — New Questions
Slice Displaying Grids Instead of Color
Just like the title said, I have a problem with displaying the correct slice. I attach the said generated figure below. Also this is my test script:
tas = ncread("datadary_ATM.2023030100.nc", "ta");
lat = ncread("datadary_ATM.2023030100.nc", "lat");
lon = ncread("datadary_ATM.2023030100.nc", "lon");
kz = ncread("datadary_ATM.2023030100.nc", "kz");
time = ncread("datadary_ATM.2023030100.nc", "time");
ta = ncread("datadary_ATM.2023030100.nc", "ta"); ta = ta – 273.15;
ua = ncread("datadary_ATM.2023030100.nc", "ua"); ua = ua(:, :, 1, 4);
va = ncread("datadary_ATM.2023030100.nc", "va"); va = va(:, :, 1, 4);
wa = ncread("datadary_ATM.2023030100.nc", "wa"); wa = wa(:, :, 1, 4);
[longrid, latgrid] = meshgrid(lon, lat);
kzlevel = 18;
kz2d = kz(kzlevel) * ones(size(longrid));
[x,y,z] = meshgrid(lon, lat, kz);
ta = squeeze(ta(:,:,:,1));
figure;
slice(x,y,z,ta,[],[],1:4);
colormap("turbo");
colorbar;
clim([0 50]);
axis xy;Just like the title said, I have a problem with displaying the correct slice. I attach the said generated figure below. Also this is my test script:
tas = ncread("datadary_ATM.2023030100.nc", "ta");
lat = ncread("datadary_ATM.2023030100.nc", "lat");
lon = ncread("datadary_ATM.2023030100.nc", "lon");
kz = ncread("datadary_ATM.2023030100.nc", "kz");
time = ncread("datadary_ATM.2023030100.nc", "time");
ta = ncread("datadary_ATM.2023030100.nc", "ta"); ta = ta – 273.15;
ua = ncread("datadary_ATM.2023030100.nc", "ua"); ua = ua(:, :, 1, 4);
va = ncread("datadary_ATM.2023030100.nc", "va"); va = va(:, :, 1, 4);
wa = ncread("datadary_ATM.2023030100.nc", "wa"); wa = wa(:, :, 1, 4);
[longrid, latgrid] = meshgrid(lon, lat);
kzlevel = 18;
kz2d = kz(kzlevel) * ones(size(longrid));
[x,y,z] = meshgrid(lon, lat, kz);
ta = squeeze(ta(:,:,:,1));
figure;
slice(x,y,z,ta,[],[],1:4);
colormap("turbo");
colorbar;
clim([0 50]);
axis xy; Just like the title said, I have a problem with displaying the correct slice. I attach the said generated figure below. Also this is my test script:
tas = ncread("datadary_ATM.2023030100.nc", "ta");
lat = ncread("datadary_ATM.2023030100.nc", "lat");
lon = ncread("datadary_ATM.2023030100.nc", "lon");
kz = ncread("datadary_ATM.2023030100.nc", "kz");
time = ncread("datadary_ATM.2023030100.nc", "time");
ta = ncread("datadary_ATM.2023030100.nc", "ta"); ta = ta – 273.15;
ua = ncread("datadary_ATM.2023030100.nc", "ua"); ua = ua(:, :, 1, 4);
va = ncread("datadary_ATM.2023030100.nc", "va"); va = va(:, :, 1, 4);
wa = ncread("datadary_ATM.2023030100.nc", "wa"); wa = wa(:, :, 1, 4);
[longrid, latgrid] = meshgrid(lon, lat);
kzlevel = 18;
kz2d = kz(kzlevel) * ones(size(longrid));
[x,y,z] = meshgrid(lon, lat, kz);
ta = squeeze(ta(:,:,:,1));
figure;
slice(x,y,z,ta,[],[],1:4);
colormap("turbo");
colorbar;
clim([0 50]);
axis xy; 4d, visualization, slice MATLAB Answers — New Questions
How can I get the new coordinates of a point after rotation of an image (2D)?
I have got the coordinates of a point (P) in my main image (2D). The main image (im) is now rotated using imrotate and the angle alpha. Now, I want to know what the coordinates of P are in the rotated image.
P = [5;8]; % coordinates of point
alpha = 45; % angle for rotation
RotatedIm = imrotate(im,alpha); % rotation of the main image (im)
RotMatrix = [cosd(alpha) -sind(alpha); sind(alpha) cosd(alpha)];
ImCenter = (size(im)/2)’; % Center of the main image
RotatedP = RotMatrix*(P-ImCenter)+ImCenter; % Rotation of point P over center of the image with angle alpha
The rotatedP coordinates are not the right ones. The problem is that there are zeros added on the borders of RotatedIm. I think that that is the reason why the coordinates of RotatedP are not correct. Can someone help me to find the coordinates of point P in the rotated image?I have got the coordinates of a point (P) in my main image (2D). The main image (im) is now rotated using imrotate and the angle alpha. Now, I want to know what the coordinates of P are in the rotated image.
P = [5;8]; % coordinates of point
alpha = 45; % angle for rotation
RotatedIm = imrotate(im,alpha); % rotation of the main image (im)
RotMatrix = [cosd(alpha) -sind(alpha); sind(alpha) cosd(alpha)];
ImCenter = (size(im)/2)’; % Center of the main image
RotatedP = RotMatrix*(P-ImCenter)+ImCenter; % Rotation of point P over center of the image with angle alpha
The rotatedP coordinates are not the right ones. The problem is that there are zeros added on the borders of RotatedIm. I think that that is the reason why the coordinates of RotatedP are not correct. Can someone help me to find the coordinates of point P in the rotated image? I have got the coordinates of a point (P) in my main image (2D). The main image (im) is now rotated using imrotate and the angle alpha. Now, I want to know what the coordinates of P are in the rotated image.
P = [5;8]; % coordinates of point
alpha = 45; % angle for rotation
RotatedIm = imrotate(im,alpha); % rotation of the main image (im)
RotMatrix = [cosd(alpha) -sind(alpha); sind(alpha) cosd(alpha)];
ImCenter = (size(im)/2)’; % Center of the main image
RotatedP = RotMatrix*(P-ImCenter)+ImCenter; % Rotation of point P over center of the image with angle alpha
The rotatedP coordinates are not the right ones. The problem is that there are zeros added on the borders of RotatedIm. I think that that is the reason why the coordinates of RotatedP are not correct. Can someone help me to find the coordinates of point P in the rotated image? imrotate, rotation matrix MATLAB Answers — New Questions
Stop Windows MATLAB adjusting figure’s position and size
I am writing some MATLAB code to export some graphics, which is "large". I tested my code on Windows system and I found that the position and size of the figure were adjusted.
I looked up the Help Center and saw the note (figure properties) as follows.
The Windows operating system enforces a minimum window width and a maximum window size. If you specify a figure size outside of those limits, the displayed figure will conform to the limits instead of the size you specified.
I wonder if there is some approah can stop Windows from changing the figure or adjust the minimum window width and maximum window size on Windows MATLAB?I am writing some MATLAB code to export some graphics, which is "large". I tested my code on Windows system and I found that the position and size of the figure were adjusted.
I looked up the Help Center and saw the note (figure properties) as follows.
The Windows operating system enforces a minimum window width and a maximum window size. If you specify a figure size outside of those limits, the displayed figure will conform to the limits instead of the size you specified.
I wonder if there is some approah can stop Windows from changing the figure or adjust the minimum window width and maximum window size on Windows MATLAB? I am writing some MATLAB code to export some graphics, which is "large". I tested my code on Windows system and I found that the position and size of the figure were adjusted.
I looked up the Help Center and saw the note (figure properties) as follows.
The Windows operating system enforces a minimum window width and a maximum window size. If you specify a figure size outside of those limits, the displayed figure will conform to the limits instead of the size you specified.
I wonder if there is some approah can stop Windows from changing the figure or adjust the minimum window width and maximum window size on Windows MATLAB? figure, plotting, windows, size, position MATLAB Answers — New Questions
How to apply bank angle in Vehicle composer app?
Hi, I’m currently trying to figure out how to apply road bank angle to an environment in Simulink via a virtual vehicle composer app. Most of the blocks seem to be utilised from the vehicle dynamics blockset library, but it seems difficult to account for this in the ‘VehicleBody6DOF’ block or the ‘MFtire’ block itself. Do you have any recommendations? I’m having a hard time figuring out how to deform the model.Hi, I’m currently trying to figure out how to apply road bank angle to an environment in Simulink via a virtual vehicle composer app. Most of the blocks seem to be utilised from the vehicle dynamics blockset library, but it seems difficult to account for this in the ‘VehicleBody6DOF’ block or the ‘MFtire’ block itself. Do you have any recommendations? I’m having a hard time figuring out how to deform the model. Hi, I’m currently trying to figure out how to apply road bank angle to an environment in Simulink via a virtual vehicle composer app. Most of the blocks seem to be utilised from the vehicle dynamics blockset library, but it seems difficult to account for this in the ‘VehicleBody6DOF’ block or the ‘MFtire’ block itself. Do you have any recommendations? I’m having a hard time figuring out how to deform the model. simulink, vehicle dynamics MATLAB Answers — New Questions
How to set environment variables on Raspberry PI for deployment of TFLite on Pi?
Hi!
I am trying to follow some examples for deploying trained Tensorflow Lite models from MATLAB to Raspberry Pi. Here are the pre-requisites I am trying to satisfiy:
https://www.mathworks.com/help/deeplearning/ug/prerequisites-for-deep-learning-with-tensorflow-lite-models.html
At the end of this page, there are some instructions on setting some environment variables. I could do as instructed on the host computer, but I am confused how to set the variables on Raspberry Pi. Specifically, I couldn’t find the correct paths for TFLITE_PATH and LD_LIBRARY_PATH. According to the instructions, I should set
TFLITE_PATH: Location of the TensorFlow Lite library directory.
LD_LIBRARY_PATH: Location of the run-time shared library. For example, TFLITE_PATH/lib/tensorflow/lite.
Here is how I installed TFLite on my Raspberry Pi. I used the command "python3 -m pip install tflite-runtime", which seemed to successfully install TFLite. This can be verified when I excuted the following commands on the Pi terminal:
python3
import tflite_runtime
tflite_runtime.__version__
which then shows ‘2.5.0’.
When I executed "python3 -m pip show tflite_runtime", this is what I see:
Name: tflite-runtime
Version: 2.5.0
Summary: TensorFlow Lite is for mobile and embedded devices.
Home-page: https://www.tensorflow.org/lite/
Author: Google, LLC
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /home/pi/.local/lib/python3.7/site-packages
Requires: numpy
Required-by:
I’m not sure if that "site-packages" folder is the correct location for the library. If I set this to be my TFLITE_PATH, there is no such sub-directory as "TFLITE_PATH/lib/tensorflow/lite" which is supposed to be defined as LD_LIBRARY_PATH.
Please let me know if I am missing anything. Thank you!Hi!
I am trying to follow some examples for deploying trained Tensorflow Lite models from MATLAB to Raspberry Pi. Here are the pre-requisites I am trying to satisfiy:
https://www.mathworks.com/help/deeplearning/ug/prerequisites-for-deep-learning-with-tensorflow-lite-models.html
At the end of this page, there are some instructions on setting some environment variables. I could do as instructed on the host computer, but I am confused how to set the variables on Raspberry Pi. Specifically, I couldn’t find the correct paths for TFLITE_PATH and LD_LIBRARY_PATH. According to the instructions, I should set
TFLITE_PATH: Location of the TensorFlow Lite library directory.
LD_LIBRARY_PATH: Location of the run-time shared library. For example, TFLITE_PATH/lib/tensorflow/lite.
Here is how I installed TFLite on my Raspberry Pi. I used the command "python3 -m pip install tflite-runtime", which seemed to successfully install TFLite. This can be verified when I excuted the following commands on the Pi terminal:
python3
import tflite_runtime
tflite_runtime.__version__
which then shows ‘2.5.0’.
When I executed "python3 -m pip show tflite_runtime", this is what I see:
Name: tflite-runtime
Version: 2.5.0
Summary: TensorFlow Lite is for mobile and embedded devices.
Home-page: https://www.tensorflow.org/lite/
Author: Google, LLC
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /home/pi/.local/lib/python3.7/site-packages
Requires: numpy
Required-by:
I’m not sure if that "site-packages" folder is the correct location for the library. If I set this to be my TFLITE_PATH, there is no such sub-directory as "TFLITE_PATH/lib/tensorflow/lite" which is supposed to be defined as LD_LIBRARY_PATH.
Please let me know if I am missing anything. Thank you! Hi!
I am trying to follow some examples for deploying trained Tensorflow Lite models from MATLAB to Raspberry Pi. Here are the pre-requisites I am trying to satisfiy:
https://www.mathworks.com/help/deeplearning/ug/prerequisites-for-deep-learning-with-tensorflow-lite-models.html
At the end of this page, there are some instructions on setting some environment variables. I could do as instructed on the host computer, but I am confused how to set the variables on Raspberry Pi. Specifically, I couldn’t find the correct paths for TFLITE_PATH and LD_LIBRARY_PATH. According to the instructions, I should set
TFLITE_PATH: Location of the TensorFlow Lite library directory.
LD_LIBRARY_PATH: Location of the run-time shared library. For example, TFLITE_PATH/lib/tensorflow/lite.
Here is how I installed TFLite on my Raspberry Pi. I used the command "python3 -m pip install tflite-runtime", which seemed to successfully install TFLite. This can be verified when I excuted the following commands on the Pi terminal:
python3
import tflite_runtime
tflite_runtime.__version__
which then shows ‘2.5.0’.
When I executed "python3 -m pip show tflite_runtime", this is what I see:
Name: tflite-runtime
Version: 2.5.0
Summary: TensorFlow Lite is for mobile and embedded devices.
Home-page: https://www.tensorflow.org/lite/
Author: Google, LLC
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /home/pi/.local/lib/python3.7/site-packages
Requires: numpy
Required-by:
I’m not sure if that "site-packages" folder is the correct location for the library. If I set this to be my TFLITE_PATH, there is no such sub-directory as "TFLITE_PATH/lib/tensorflow/lite" which is supposed to be defined as LD_LIBRARY_PATH.
Please let me know if I am missing anything. Thank you! raspberry pi, tensorflow lite, deployment MATLAB Answers — New Questions
how assign cell to dropdown menu
app.PeriodicityDropDown.Items
ans =
1×4 cell array
{‘Option 1’} {‘Option 2’} {‘Option 3’} {‘Option 4’}
K>> class(tmp)
ans =
‘double’
i try this solution:
K>> app.PeriodicityDropDown.Items={tmp}
‘Items’ must be a 1-by-N cell array of character vectors or a string array.
K>> app.PeriodicityDropDown.Items=num2cell(tmp)
‘Items’ must be a 1-by-N cell array of character vectors or a string array.
how can i assign it?app.PeriodicityDropDown.Items
ans =
1×4 cell array
{‘Option 1’} {‘Option 2’} {‘Option 3’} {‘Option 4’}
K>> class(tmp)
ans =
‘double’
i try this solution:
K>> app.PeriodicityDropDown.Items={tmp}
‘Items’ must be a 1-by-N cell array of character vectors or a string array.
K>> app.PeriodicityDropDown.Items=num2cell(tmp)
‘Items’ must be a 1-by-N cell array of character vectors or a string array.
how can i assign it? app.PeriodicityDropDown.Items
ans =
1×4 cell array
{‘Option 1’} {‘Option 2’} {‘Option 3’} {‘Option 4’}
K>> class(tmp)
ans =
‘double’
i try this solution:
K>> app.PeriodicityDropDown.Items={tmp}
‘Items’ must be a 1-by-N cell array of character vectors or a string array.
K>> app.PeriodicityDropDown.Items=num2cell(tmp)
‘Items’ must be a 1-by-N cell array of character vectors or a string array.
how can i assign it? how assign cell to dropdown menu MATLAB Answers — New Questions
matlab program in 3- piont guassian quadrature to evaluate integral f(x)= sin(�x/10)
n/an/a n/a n/a MATLAB Answers — New Questions
mapping the thrust and torques applied to the quadcopter to the PWM commands (PX4_Autopilot)
Hello,I’m trying to implement a simple Hardware-in-the-Loop (HITL) simulation using PX4 and the UAV Toolbox Support Package for PX4 Autopilots (using PX4 Host Target). Specifically, I’ve customized a different controller for the quadcopter. However, I’m having trouble understanding how to use the actuator_write block. I’ve read the documentation, which states that the input should be between -1 and +1. How can we map the thrust and torques applied to the quadcopter to the commands u? Thanks.Hello,I’m trying to implement a simple Hardware-in-the-Loop (HITL) simulation using PX4 and the UAV Toolbox Support Package for PX4 Autopilots (using PX4 Host Target). Specifically, I’ve customized a different controller for the quadcopter. However, I’m having trouble understanding how to use the actuator_write block. I’ve read the documentation, which states that the input should be between -1 and +1. How can we map the thrust and torques applied to the quadcopter to the commands u? Thanks. Hello,I’m trying to implement a simple Hardware-in-the-Loop (HITL) simulation using PX4 and the UAV Toolbox Support Package for PX4 Autopilots (using PX4 Host Target). Specifically, I’ve customized a different controller for the quadcopter. However, I’m having trouble understanding how to use the actuator_write block. I’ve read the documentation, which states that the input should be between -1 and +1. How can we map the thrust and torques applied to the quadcopter to the commands u? Thanks. px4, uav control MATLAB Answers — New Questions
Mean of 1000 for loop Euler-Maruyama simulations of SDE
Hello,
I’m experimenting with this code adapted from the paper "An Algorithmic Introduction to Numerical Simulation of Stochastic Differential Equations" by Desmond J. Higham. It runs a simulation of an SDE then plots the single simulation. I’m trying to make it so the program runs many such simulations, say 1000, and then plots their mean, so the graph should be more like a smooth line (I am trying to see if it is). Basically I want to take the for loop in this code, run it 1000 times, then get the mean of the 1000 results we get and plot its graph.
I’d appreciate some advice, I’m sure the solution is fairly simple but I haven’t been successful in my attempts.
%EM Euler-Maruyama method on linear SDE
% Discretized Brownian path over [0,1] has dt = 2^(-8).
% Euler-Maruyama uses timestep R*dt.
%randn("state",100)
Xzero = 0; % problem parameters
T = 1;
N = 2^8;
dt = 1/N;
r=1;
G=0.7;
e=0.5;
M=1000;
dW = sqrt(dt)*randn(M,N); % Brownian increments
W = cumsum(dW); % discretized Brownian path
R = 2; Dt = R*dt; L = N/R; % L EM steps of size Dt = R*dt
Xem = zeros(1,L); % preallocate for efficiency
Xtemp = Xzero;
for j = 1:L
Winc = sum(dW(R*(j-1)+1:R*j));
Xtemp = Dt*r*(G-Xtemp) + sqrt((e*Xtemp)*(1-Xtemp))*Winc;
Xem(j) = Xtemp;
end
plot([0:Dt:T],[Xzero,Xem],"r–*"), hold off
xlabel("t","FontSize",12)
ylabel("X","FontSize",16,"Rotation",0,"HorizontalAlignment","right")Hello,
I’m experimenting with this code adapted from the paper "An Algorithmic Introduction to Numerical Simulation of Stochastic Differential Equations" by Desmond J. Higham. It runs a simulation of an SDE then plots the single simulation. I’m trying to make it so the program runs many such simulations, say 1000, and then plots their mean, so the graph should be more like a smooth line (I am trying to see if it is). Basically I want to take the for loop in this code, run it 1000 times, then get the mean of the 1000 results we get and plot its graph.
I’d appreciate some advice, I’m sure the solution is fairly simple but I haven’t been successful in my attempts.
%EM Euler-Maruyama method on linear SDE
% Discretized Brownian path over [0,1] has dt = 2^(-8).
% Euler-Maruyama uses timestep R*dt.
%randn("state",100)
Xzero = 0; % problem parameters
T = 1;
N = 2^8;
dt = 1/N;
r=1;
G=0.7;
e=0.5;
M=1000;
dW = sqrt(dt)*randn(M,N); % Brownian increments
W = cumsum(dW); % discretized Brownian path
R = 2; Dt = R*dt; L = N/R; % L EM steps of size Dt = R*dt
Xem = zeros(1,L); % preallocate for efficiency
Xtemp = Xzero;
for j = 1:L
Winc = sum(dW(R*(j-1)+1:R*j));
Xtemp = Dt*r*(G-Xtemp) + sqrt((e*Xtemp)*(1-Xtemp))*Winc;
Xem(j) = Xtemp;
end
plot([0:Dt:T],[Xzero,Xem],"r–*"), hold off
xlabel("t","FontSize",12)
ylabel("X","FontSize",16,"Rotation",0,"HorizontalAlignment","right") Hello,
I’m experimenting with this code adapted from the paper "An Algorithmic Introduction to Numerical Simulation of Stochastic Differential Equations" by Desmond J. Higham. It runs a simulation of an SDE then plots the single simulation. I’m trying to make it so the program runs many such simulations, say 1000, and then plots their mean, so the graph should be more like a smooth line (I am trying to see if it is). Basically I want to take the for loop in this code, run it 1000 times, then get the mean of the 1000 results we get and plot its graph.
I’d appreciate some advice, I’m sure the solution is fairly simple but I haven’t been successful in my attempts.
%EM Euler-Maruyama method on linear SDE
% Discretized Brownian path over [0,1] has dt = 2^(-8).
% Euler-Maruyama uses timestep R*dt.
%randn("state",100)
Xzero = 0; % problem parameters
T = 1;
N = 2^8;
dt = 1/N;
r=1;
G=0.7;
e=0.5;
M=1000;
dW = sqrt(dt)*randn(M,N); % Brownian increments
W = cumsum(dW); % discretized Brownian path
R = 2; Dt = R*dt; L = N/R; % L EM steps of size Dt = R*dt
Xem = zeros(1,L); % preallocate for efficiency
Xtemp = Xzero;
for j = 1:L
Winc = sum(dW(R*(j-1)+1:R*j));
Xtemp = Dt*r*(G-Xtemp) + sqrt((e*Xtemp)*(1-Xtemp))*Winc;
Xem(j) = Xtemp;
end
plot([0:Dt:T],[Xzero,Xem],"r–*"), hold off
xlabel("t","FontSize",12)
ylabel("X","FontSize",16,"Rotation",0,"HorizontalAlignment","right") for loop, mean, graph MATLAB Answers — New Questions
Does MATLAB still allow for the use of Property Inspector to edit axis labels?
I am attempting to edit the Y-axis labels and ticks in a plot using the Property Inspector, in MATLAB 2023b. I am able to alter the labels and tick marks in the Property Inspector window. However, the changes do not get applied to the figure.
In previous versions of MATLAB, the user changes were applied when the user pushed the Apply and OK buttons in the Edit Axes Ticks window.
Although it appears this topic has been brought up several times, I can’t find a link to a possible resolution to this issue.
Assuming we can still apply updated Axes and Axes Ticks values, using the Property Inspector, does anyone have a link containing this solution?
Thank YouI am attempting to edit the Y-axis labels and ticks in a plot using the Property Inspector, in MATLAB 2023b. I am able to alter the labels and tick marks in the Property Inspector window. However, the changes do not get applied to the figure.
In previous versions of MATLAB, the user changes were applied when the user pushed the Apply and OK buttons in the Edit Axes Ticks window.
Although it appears this topic has been brought up several times, I can’t find a link to a possible resolution to this issue.
Assuming we can still apply updated Axes and Axes Ticks values, using the Property Inspector, does anyone have a link containing this solution?
Thank You I am attempting to edit the Y-axis labels and ticks in a plot using the Property Inspector, in MATLAB 2023b. I am able to alter the labels and tick marks in the Property Inspector window. However, the changes do not get applied to the figure.
In previous versions of MATLAB, the user changes were applied when the user pushed the Apply and OK buttons in the Edit Axes Ticks window.
Although it appears this topic has been brought up several times, I can’t find a link to a possible resolution to this issue.
Assuming we can still apply updated Axes and Axes Ticks values, using the Property Inspector, does anyone have a link containing this solution?
Thank You property inspector MATLAB Answers — New Questions
Why simulink double click or block properties respond slow
I’ve Matlab R2021b version that is installed on a higher end laptop now and the respond in Simulink to add new block or to open properties of a block is slow. The lower end laptops that I used Simulink on before responded as soon as I double click it.I’ve Matlab R2021b version that is installed on a higher end laptop now and the respond in Simulink to add new block or to open properties of a block is slow. The lower end laptops that I used Simulink on before responded as soon as I double click it. I’ve Matlab R2021b version that is installed on a higher end laptop now and the respond in Simulink to add new block or to open properties of a block is slow. The lower end laptops that I used Simulink on before responded as soon as I double click it. simulink, blocks, double-click MATLAB Answers — New Questions
how to insert image to gui?
i want to insert image to gui.i created axes and tried to insert.imaged is loaded,but error is ,imaged not loading inside the axes og gui o/p.it opening as separate image window.help neededi want to insert image to gui.i created axes and tried to insert.imaged is loaded,but error is ,imaged not loading inside the axes og gui o/p.it opening as separate image window.help needed i want to insert image to gui.i created axes and tried to insert.imaged is loaded,but error is ,imaged not loading inside the axes og gui o/p.it opening as separate image window.help needed gui, image, imread, imshow MATLAB Answers — New Questions
mass calculation error when computing rocket trajectory
Hello,
I have project, where I am trying to compute the trajectory of a rocket and also compute when to release a smaller rocket. The code works in general and uses Rungekutta. The main issue is computing the fuelconsumtion/remaining fuel mass. The issue seems that the mass resets after some time and I am not sure the fuel consumtion or fuel mass is computed in the correct manner.
Any help is greatly appriciatedHello,
I have project, where I am trying to compute the trajectory of a rocket and also compute when to release a smaller rocket. The code works in general and uses Rungekutta. The main issue is computing the fuelconsumtion/remaining fuel mass. The issue seems that the mass resets after some time and I am not sure the fuel consumtion or fuel mass is computed in the correct manner.
Any help is greatly appriciated Hello,
I have project, where I am trying to compute the trajectory of a rocket and also compute when to release a smaller rocket. The code works in general and uses Rungekutta. The main issue is computing the fuelconsumtion/remaining fuel mass. The issue seems that the mass resets after some time and I am not sure the fuel consumtion or fuel mass is computed in the correct manner.
Any help is greatly appriciated runge-kutta, rocket trajectory, mass computation, ode MATLAB Answers — New Questions
calculate with Twiddle factor
Does anybody knows how to calculate the Twiddle Factors?
For example: for n=4 you have to do the calculate Wn= e^(-j*2*π)/n and ypu have to do it for a table 4×4.
table looks like..
<</matlabcentral/answers/uploaded_files/44456/%CE%A7%CF%89%CF%81%CE%AF%CF%82%20%CF%84%CE%AF%CF%84%CE%BB%CE%BF.jpg>>
the second is the table after calculate the 4×4
and i need this for calculate twiddle factors for n=8,16,24…Does anybody knows how to calculate the Twiddle Factors?
For example: for n=4 you have to do the calculate Wn= e^(-j*2*π)/n and ypu have to do it for a table 4×4.
table looks like..
<</matlabcentral/answers/uploaded_files/44456/%CE%A7%CF%89%CF%81%CE%AF%CF%82%20%CF%84%CE%AF%CF%84%CE%BB%CE%BF.jpg>>
the second is the table after calculate the 4×4
and i need this for calculate twiddle factors for n=8,16,24… Does anybody knows how to calculate the Twiddle Factors?
For example: for n=4 you have to do the calculate Wn= e^(-j*2*π)/n and ypu have to do it for a table 4×4.
table looks like..
<</matlabcentral/answers/uploaded_files/44456/%CE%A7%CF%89%CF%81%CE%AF%CF%82%20%CF%84%CE%AF%CF%84%CE%BB%CE%BF.jpg>>
the second is the table after calculate the 4×4
and i need this for calculate twiddle factors for n=8,16,24… twiddle factor, calculate MATLAB Answers — New Questions