Tag Archives: matlab
I want to convert the large datetime data into double format.
I used datenum command, but its changing the value. The code and the values are attached below. Here TimestampHide is the data from an excel sheet.
MATLAB Code:
>> T=TimestampHide;
>> T.Format = ‘yyyy-MM-dd HH:mm:ss.SSS’;
>> Z=datenum(T);
The value of ZI used datenum command, but its changing the value. The code and the values are attached below. Here TimestampHide is the data from an excel sheet.
MATLAB Code:
>> T=TimestampHide;
>> T.Format = ‘yyyy-MM-dd HH:mm:ss.SSS’;
>> Z=datenum(T);
The value of Z I used datenum command, but its changing the value. The code and the values are attached below. Here TimestampHide is the data from an excel sheet.
MATLAB Code:
>> T=TimestampHide;
>> T.Format = ‘yyyy-MM-dd HH:mm:ss.SSS’;
>> Z=datenum(T);
The value of Z timestamp, datetime MATLAB Answers — New Questions
How can I adjust boxchart to have different number of groups for different nr of classes?
I would like to change this graph by keeping 4 boxplots for 4 and 6 classes, and then having only blue and red boxplots for 8 classes.I would like to change this graph by keeping 4 boxplots for 4 and 6 classes, and then having only blue and red boxplots for 8 classes. I would like to change this graph by keeping 4 boxplots for 4 and 6 classes, and then having only blue and red boxplots for 8 classes. matlab, graph, plot MATLAB Answers — New Questions
Matlab function only giving me 1 output
I have a function but its only giving me 1 output as an answer.
>> theta = 0:0.01:90;
>> Vmax = sqrt((0.25.*cos(theta).*9.8.*(sin(theta)+0.2.*cos(theta)))/(cos(theta)-0.2.*sin(theta)))
Vmax =
0.1514
I want to plot this on a graph but it only interprets the function as having 1 value. I’ve done functions this way before like if i just say
>> x = 0:0.01:pi;
>> y = sin(x);
it works fine so why is my Vmax just giving me 1 value.I have a function but its only giving me 1 output as an answer.
>> theta = 0:0.01:90;
>> Vmax = sqrt((0.25.*cos(theta).*9.8.*(sin(theta)+0.2.*cos(theta)))/(cos(theta)-0.2.*sin(theta)))
Vmax =
0.1514
I want to plot this on a graph but it only interprets the function as having 1 value. I’ve done functions this way before like if i just say
>> x = 0:0.01:pi;
>> y = sin(x);
it works fine so why is my Vmax just giving me 1 value. I have a function but its only giving me 1 output as an answer.
>> theta = 0:0.01:90;
>> Vmax = sqrt((0.25.*cos(theta).*9.8.*(sin(theta)+0.2.*cos(theta)))/(cos(theta)-0.2.*sin(theta)))
Vmax =
0.1514
I want to plot this on a graph but it only interprets the function as having 1 value. I’ve done functions this way before like if i just say
>> x = 0:0.01:pi;
>> y = sin(x);
it works fine so why is my Vmax just giving me 1 value. help, function MATLAB Answers — New Questions
Error when buliding PX4 firmware with some deactivated modules
Dear all,
I am currently using simulink to impememt my filght controller into Pixhawk 6x. At the step of building PX4 firmware I followed this tutorial https://ch.mathworks.com/help/uav/px4/ug/disable-control-modules.html. to avoid flash memory overflow issues, since building a default PX4 firmware itself takes already 99% of the total flash usage.
I change the code
CONFIG_MODULES_MC_ATT_CONTROL=y
to
CONFIG_MODULES_MC_ATT_CONTROL=n
in the file default.px4board.original and resave it as a new file hil.px4board. in the same folder.
In the Hardware Setup screen I tried to build ths new firmware but there is then an Error in cmd window,saying:
[706/1094] Building CXX object src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj
FAILED: src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj
/usr/bin/ccache /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4_FMU_V6X -DMODULE_NAME="flight_mode_manager" -DPX4_MAIN=flight_mode_manager_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I../../boards/px4/fmu-v6x/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc/lib -I../../platforms/nuttx/src/px4/stm/stm32h7/include -I../../platforms/common -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/matrix -I../../src/modules -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/armv7-m -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/chip -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/common -I../../platforms/nuttx/NuttX/apps/include -Iexternal/Install/include -I../../src/modules/flight_mode_manager -Isrc/modules/flight_mode_manager -I../../src/modules/flight_mode_manager/tasks/Auto -I../../src/modules/flight_mode_manager/tasks/FlightTask -I../../src/modules/flight_mode_manager/tasks/Utility -I../../src/lib/slew_rate -I../../src/lib/motion_planning -I../../src/modules/flight_mode_manager/tasks/Descend -I../../src/modules/flight_mode_manager/tasks/Failsafe -I../../src/modules/flight_mode_manager/tasks/ManualAcceleration -I../../src/modules/flight_mode_manager/tasks/ManualAltitudeSmoothVel -I../../src/modules/flight_mode_manager/tasks/ManualAltitude -I../../src/modules/flight_mode_manager/tasks/ManualPosition -I../../src/modules/flight_mode_manager/tasks/ManualPositionSmoothVel -I../../src/modules/flight_mode_manager/tasks/Transition -I../../src/modules/flight_mode_manager/tasks/AutoFollowTarget -I../../src/modules/flight_mode_manager/tasks/Orbit -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -Wreorder -Wno-overloaded-virtual -fno-rtti -fno-exceptions -fno-sized-deallocation -fno-threadsafe-statics -nostdinc++ -Wno-cast-align -Wframe-larger-than=2048 -D__KERNEL__ -std=gnu++14 -MD -MT src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj -MF src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj.d -o src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj -c ../../src/modules/flight_mode_manager/FlightModeManager.cpp
In file included from ../../platforms/common/include/px4_platform_common/param.h:42,
from ../../platforms/common/include/px4_platform_common/module_params.h:44,
from ../../src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.hpp:44,
from ../../src/modules/flight_mode_manager/FlightModeManager.hpp:36,
from ../../src/modules/flight_mode_manager/FlightModeManager.cpp:34:
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:70:28: error: ‘MC_MAN_TILT_TAU’ is not a member of ‘px4::params’; did you mean ‘MPC_MAN_TILT_MAX’?
70 | (ParamFloat<px4::params::MC_MAN_TILT_TAU>) _param_mc_man_tilt_tau ///< time constant for stick filter
| ^~~~~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:239:18: note: in definition of macro ‘REM’
239 | #define REM(…) __VA_ARGS__
| ^~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:60:40: note: in expansion of macro ‘PAIR’
60 | do_not_explicitly_use_this_namespace::PAIR(x);
| ^~~~
../../platforms/common/include/px4_platform_common/param_macros.h:45:36: note: in expansion of macro ‘_DEFINE_SINGLE_PARAMETER’
45 | #define APPLY2(t, aaa, aab) t(aaa) t(aab)
| ^
../../platforms/common/include/px4_platform_common/param_macros.h:197:33: note: in expansion of macro ‘APPLY2’
197 | #define APPLY_ALL_H3(t, n, …) APPLY##n(t, __VA_ARGS__)
| ^~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:198:33: note: in expansion of macro ‘APPLY_ALL_H3’
198 | #define APPLY_ALL_H2(t, n, …) APPLY_ALL_H3(t, n, __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:199:27: note: in expansion of macro ‘APPLY_ALL_H2’
199 | #define APPLY_ALL(t, …) APPLY_ALL_H2(t, NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:81:2: note: in expansion of macro ‘APPLY_ALL’
81 | APPLY_ALL(_DEFINE_SINGLE_PARAMETER, __VA_ARGS__)
| ^~~~~~~~~
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:68:2: note: in expansion of macro ‘DEFINE_PARAMETERS’
68 | DEFINE_PARAMETERS(
| ^~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
and
[707/1094] Building CXX object src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj
FAILED: src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj
/usr/bin/ccache /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4_FMU_V6X -DMODULE_NAME="flight_mode_manager" -DPX4_MAIN=flight_mode_manager_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I../../boards/px4/fmu-v6x/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc/lib -I../../platforms/nuttx/src/px4/stm/stm32h7/include -I../../platforms/common -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/matrix -I../../src/modules -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/armv7-m -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/chip -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/common -I../../platforms/nuttx/NuttX/apps/include -Iexternal/Install/include -I../../src/modules/flight_mode_manager -Isrc/modules/flight_mode_manager -I../../src/modules/flight_mode_manager/tasks/Auto -I../../src/modules/flight_mode_manager/tasks/FlightTask -I../../src/modules/flight_mode_manager/tasks/Utility -I../../src/lib/slew_rate -I../../src/lib/motion_planning -I../../src/modules/flight_mode_manager/tasks/Descend -I../../src/modules/flight_mode_manager/tasks/Failsafe -I../../src/modules/flight_mode_manager/tasks/ManualAcceleration -I../../src/modules/flight_mode_manager/tasks/ManualAltitudeSmoothVel -I../../src/modules/flight_mode_manager/tasks/ManualAltitude -I../../src/modules/flight_mode_manager/tasks/ManualPosition -I../../src/modules/flight_mode_manager/tasks/ManualPositionSmoothVel -I../../src/modules/flight_mode_manager/tasks/Transition -I../../src/modules/flight_mode_manager/tasks/AutoFollowTarget -I../../src/modules/flight_mode_manager/tasks/Orbit -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -Wreorder -Wno-overloaded-virtual -fno-rtti -fno-exceptions -fno-sized-deallocation -fno-threadsafe-statics -nostdinc++ -Wno-cast-align -Wframe-larger-than=2048 -D__KERNEL__ -std=gnu++14 -MD -MT src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj -MF src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj.d -o src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj -c src/modules/flight_mode_manager/FlightTasks_generated.cpp
In file included from ../../platforms/common/include/px4_platform_common/param.h:42,
from ../../platforms/common/include/px4_platform_common/module_params.h:44,
from ../../src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.hpp:44,
from ../../src/modules/flight_mode_manager/FlightModeManager.hpp:36,
from src/modules/flight_mode_manager/FlightTasks_generated.cpp:42:
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:70:28: error: ‘MC_MAN_TILT_TAU’ is not a member of ‘px4::params’; did you mean ‘MPC_MAN_TILT_MAX’?
70 | (ParamFloat<px4::params::MC_MAN_TILT_TAU>) _param_mc_man_tilt_tau ///< time constant for stick filter
| ^~~~~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:239:18: note: in definition of macro ‘REM’
239 | #define REM(…) __VA_ARGS__
| ^~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:60:40: note: in expansion of macro ‘PAIR’
60 | do_not_explicitly_use_this_namespace::PAIR(x);
| ^~~~
../../platforms/common/include/px4_platform_common/param_macros.h:45:36: note: in expansion of macro ‘_DEFINE_SINGLE_PARAMETER’
45 | #define APPLY2(t, aaa, aab) t(aaa) t(aab)
| ^
../../platforms/common/include/px4_platform_common/param_macros.h:197:33: note: in expansion of macro ‘APPLY2’
197 | #define APPLY_ALL_H3(t, n, …) APPLY##n(t, __VA_ARGS__)
| ^~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:198:33: note: in expansion of macro ‘APPLY_ALL_H3’
198 | #define APPLY_ALL_H2(t, n, …) APPLY_ALL_H3(t, n, __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:199:27: note: in expansion of macro ‘APPLY_ALL_H2’
199 | #define APPLY_ALL(t, …) APPLY_ALL_H2(t, NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:81:2: note: in expansion of macro ‘APPLY_ALL’
81 | APPLY_ALL(_DEFINE_SINGLE_PARAMETER, __VA_ARGS__)
| ^~~~~~~~~
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:68:2: note: in expansion of macro ‘DEFINE_PARAMETERS’
68 | DEFINE_PARAMETERS(
| ^~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
Have you met this issue before and how did you solve it?
any suggestions or advices are welcome.
Thanks in advance.
Y.Z.Dear all,
I am currently using simulink to impememt my filght controller into Pixhawk 6x. At the step of building PX4 firmware I followed this tutorial https://ch.mathworks.com/help/uav/px4/ug/disable-control-modules.html. to avoid flash memory overflow issues, since building a default PX4 firmware itself takes already 99% of the total flash usage.
I change the code
CONFIG_MODULES_MC_ATT_CONTROL=y
to
CONFIG_MODULES_MC_ATT_CONTROL=n
in the file default.px4board.original and resave it as a new file hil.px4board. in the same folder.
In the Hardware Setup screen I tried to build ths new firmware but there is then an Error in cmd window,saying:
[706/1094] Building CXX object src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj
FAILED: src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj
/usr/bin/ccache /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4_FMU_V6X -DMODULE_NAME="flight_mode_manager" -DPX4_MAIN=flight_mode_manager_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I../../boards/px4/fmu-v6x/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc/lib -I../../platforms/nuttx/src/px4/stm/stm32h7/include -I../../platforms/common -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/matrix -I../../src/modules -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/armv7-m -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/chip -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/common -I../../platforms/nuttx/NuttX/apps/include -Iexternal/Install/include -I../../src/modules/flight_mode_manager -Isrc/modules/flight_mode_manager -I../../src/modules/flight_mode_manager/tasks/Auto -I../../src/modules/flight_mode_manager/tasks/FlightTask -I../../src/modules/flight_mode_manager/tasks/Utility -I../../src/lib/slew_rate -I../../src/lib/motion_planning -I../../src/modules/flight_mode_manager/tasks/Descend -I../../src/modules/flight_mode_manager/tasks/Failsafe -I../../src/modules/flight_mode_manager/tasks/ManualAcceleration -I../../src/modules/flight_mode_manager/tasks/ManualAltitudeSmoothVel -I../../src/modules/flight_mode_manager/tasks/ManualAltitude -I../../src/modules/flight_mode_manager/tasks/ManualPosition -I../../src/modules/flight_mode_manager/tasks/ManualPositionSmoothVel -I../../src/modules/flight_mode_manager/tasks/Transition -I../../src/modules/flight_mode_manager/tasks/AutoFollowTarget -I../../src/modules/flight_mode_manager/tasks/Orbit -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -Wreorder -Wno-overloaded-virtual -fno-rtti -fno-exceptions -fno-sized-deallocation -fno-threadsafe-statics -nostdinc++ -Wno-cast-align -Wframe-larger-than=2048 -D__KERNEL__ -std=gnu++14 -MD -MT src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj -MF src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj.d -o src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj -c ../../src/modules/flight_mode_manager/FlightModeManager.cpp
In file included from ../../platforms/common/include/px4_platform_common/param.h:42,
from ../../platforms/common/include/px4_platform_common/module_params.h:44,
from ../../src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.hpp:44,
from ../../src/modules/flight_mode_manager/FlightModeManager.hpp:36,
from ../../src/modules/flight_mode_manager/FlightModeManager.cpp:34:
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:70:28: error: ‘MC_MAN_TILT_TAU’ is not a member of ‘px4::params’; did you mean ‘MPC_MAN_TILT_MAX’?
70 | (ParamFloat<px4::params::MC_MAN_TILT_TAU>) _param_mc_man_tilt_tau ///< time constant for stick filter
| ^~~~~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:239:18: note: in definition of macro ‘REM’
239 | #define REM(…) __VA_ARGS__
| ^~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:60:40: note: in expansion of macro ‘PAIR’
60 | do_not_explicitly_use_this_namespace::PAIR(x);
| ^~~~
../../platforms/common/include/px4_platform_common/param_macros.h:45:36: note: in expansion of macro ‘_DEFINE_SINGLE_PARAMETER’
45 | #define APPLY2(t, aaa, aab) t(aaa) t(aab)
| ^
../../platforms/common/include/px4_platform_common/param_macros.h:197:33: note: in expansion of macro ‘APPLY2’
197 | #define APPLY_ALL_H3(t, n, …) APPLY##n(t, __VA_ARGS__)
| ^~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:198:33: note: in expansion of macro ‘APPLY_ALL_H3’
198 | #define APPLY_ALL_H2(t, n, …) APPLY_ALL_H3(t, n, __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:199:27: note: in expansion of macro ‘APPLY_ALL_H2’
199 | #define APPLY_ALL(t, …) APPLY_ALL_H2(t, NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:81:2: note: in expansion of macro ‘APPLY_ALL’
81 | APPLY_ALL(_DEFINE_SINGLE_PARAMETER, __VA_ARGS__)
| ^~~~~~~~~
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:68:2: note: in expansion of macro ‘DEFINE_PARAMETERS’
68 | DEFINE_PARAMETERS(
| ^~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
and
[707/1094] Building CXX object src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj
FAILED: src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj
/usr/bin/ccache /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4_FMU_V6X -DMODULE_NAME="flight_mode_manager" -DPX4_MAIN=flight_mode_manager_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I../../boards/px4/fmu-v6x/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc/lib -I../../platforms/nuttx/src/px4/stm/stm32h7/include -I../../platforms/common -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/matrix -I../../src/modules -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/armv7-m -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/chip -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/common -I../../platforms/nuttx/NuttX/apps/include -Iexternal/Install/include -I../../src/modules/flight_mode_manager -Isrc/modules/flight_mode_manager -I../../src/modules/flight_mode_manager/tasks/Auto -I../../src/modules/flight_mode_manager/tasks/FlightTask -I../../src/modules/flight_mode_manager/tasks/Utility -I../../src/lib/slew_rate -I../../src/lib/motion_planning -I../../src/modules/flight_mode_manager/tasks/Descend -I../../src/modules/flight_mode_manager/tasks/Failsafe -I../../src/modules/flight_mode_manager/tasks/ManualAcceleration -I../../src/modules/flight_mode_manager/tasks/ManualAltitudeSmoothVel -I../../src/modules/flight_mode_manager/tasks/ManualAltitude -I../../src/modules/flight_mode_manager/tasks/ManualPosition -I../../src/modules/flight_mode_manager/tasks/ManualPositionSmoothVel -I../../src/modules/flight_mode_manager/tasks/Transition -I../../src/modules/flight_mode_manager/tasks/AutoFollowTarget -I../../src/modules/flight_mode_manager/tasks/Orbit -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -Wreorder -Wno-overloaded-virtual -fno-rtti -fno-exceptions -fno-sized-deallocation -fno-threadsafe-statics -nostdinc++ -Wno-cast-align -Wframe-larger-than=2048 -D__KERNEL__ -std=gnu++14 -MD -MT src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj -MF src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj.d -o src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj -c src/modules/flight_mode_manager/FlightTasks_generated.cpp
In file included from ../../platforms/common/include/px4_platform_common/param.h:42,
from ../../platforms/common/include/px4_platform_common/module_params.h:44,
from ../../src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.hpp:44,
from ../../src/modules/flight_mode_manager/FlightModeManager.hpp:36,
from src/modules/flight_mode_manager/FlightTasks_generated.cpp:42:
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:70:28: error: ‘MC_MAN_TILT_TAU’ is not a member of ‘px4::params’; did you mean ‘MPC_MAN_TILT_MAX’?
70 | (ParamFloat<px4::params::MC_MAN_TILT_TAU>) _param_mc_man_tilt_tau ///< time constant for stick filter
| ^~~~~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:239:18: note: in definition of macro ‘REM’
239 | #define REM(…) __VA_ARGS__
| ^~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:60:40: note: in expansion of macro ‘PAIR’
60 | do_not_explicitly_use_this_namespace::PAIR(x);
| ^~~~
../../platforms/common/include/px4_platform_common/param_macros.h:45:36: note: in expansion of macro ‘_DEFINE_SINGLE_PARAMETER’
45 | #define APPLY2(t, aaa, aab) t(aaa) t(aab)
| ^
../../platforms/common/include/px4_platform_common/param_macros.h:197:33: note: in expansion of macro ‘APPLY2’
197 | #define APPLY_ALL_H3(t, n, …) APPLY##n(t, __VA_ARGS__)
| ^~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:198:33: note: in expansion of macro ‘APPLY_ALL_H3’
198 | #define APPLY_ALL_H2(t, n, …) APPLY_ALL_H3(t, n, __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:199:27: note: in expansion of macro ‘APPLY_ALL_H2’
199 | #define APPLY_ALL(t, …) APPLY_ALL_H2(t, NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:81:2: note: in expansion of macro ‘APPLY_ALL’
81 | APPLY_ALL(_DEFINE_SINGLE_PARAMETER, __VA_ARGS__)
| ^~~~~~~~~
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:68:2: note: in expansion of macro ‘DEFINE_PARAMETERS’
68 | DEFINE_PARAMETERS(
| ^~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
Have you met this issue before and how did you solve it?
any suggestions or advices are welcome.
Thanks in advance.
Y.Z. Dear all,
I am currently using simulink to impememt my filght controller into Pixhawk 6x. At the step of building PX4 firmware I followed this tutorial https://ch.mathworks.com/help/uav/px4/ug/disable-control-modules.html. to avoid flash memory overflow issues, since building a default PX4 firmware itself takes already 99% of the total flash usage.
I change the code
CONFIG_MODULES_MC_ATT_CONTROL=y
to
CONFIG_MODULES_MC_ATT_CONTROL=n
in the file default.px4board.original and resave it as a new file hil.px4board. in the same folder.
In the Hardware Setup screen I tried to build ths new firmware but there is then an Error in cmd window,saying:
[706/1094] Building CXX object src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj
FAILED: src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj
/usr/bin/ccache /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4_FMU_V6X -DMODULE_NAME="flight_mode_manager" -DPX4_MAIN=flight_mode_manager_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I../../boards/px4/fmu-v6x/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc/lib -I../../platforms/nuttx/src/px4/stm/stm32h7/include -I../../platforms/common -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/matrix -I../../src/modules -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/armv7-m -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/chip -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/common -I../../platforms/nuttx/NuttX/apps/include -Iexternal/Install/include -I../../src/modules/flight_mode_manager -Isrc/modules/flight_mode_manager -I../../src/modules/flight_mode_manager/tasks/Auto -I../../src/modules/flight_mode_manager/tasks/FlightTask -I../../src/modules/flight_mode_manager/tasks/Utility -I../../src/lib/slew_rate -I../../src/lib/motion_planning -I../../src/modules/flight_mode_manager/tasks/Descend -I../../src/modules/flight_mode_manager/tasks/Failsafe -I../../src/modules/flight_mode_manager/tasks/ManualAcceleration -I../../src/modules/flight_mode_manager/tasks/ManualAltitudeSmoothVel -I../../src/modules/flight_mode_manager/tasks/ManualAltitude -I../../src/modules/flight_mode_manager/tasks/ManualPosition -I../../src/modules/flight_mode_manager/tasks/ManualPositionSmoothVel -I../../src/modules/flight_mode_manager/tasks/Transition -I../../src/modules/flight_mode_manager/tasks/AutoFollowTarget -I../../src/modules/flight_mode_manager/tasks/Orbit -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -Wreorder -Wno-overloaded-virtual -fno-rtti -fno-exceptions -fno-sized-deallocation -fno-threadsafe-statics -nostdinc++ -Wno-cast-align -Wframe-larger-than=2048 -D__KERNEL__ -std=gnu++14 -MD -MT src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj -MF src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj.d -o src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightModeManager.cpp.obj -c ../../src/modules/flight_mode_manager/FlightModeManager.cpp
In file included from ../../platforms/common/include/px4_platform_common/param.h:42,
from ../../platforms/common/include/px4_platform_common/module_params.h:44,
from ../../src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.hpp:44,
from ../../src/modules/flight_mode_manager/FlightModeManager.hpp:36,
from ../../src/modules/flight_mode_manager/FlightModeManager.cpp:34:
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:70:28: error: ‘MC_MAN_TILT_TAU’ is not a member of ‘px4::params’; did you mean ‘MPC_MAN_TILT_MAX’?
70 | (ParamFloat<px4::params::MC_MAN_TILT_TAU>) _param_mc_man_tilt_tau ///< time constant for stick filter
| ^~~~~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:239:18: note: in definition of macro ‘REM’
239 | #define REM(…) __VA_ARGS__
| ^~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:60:40: note: in expansion of macro ‘PAIR’
60 | do_not_explicitly_use_this_namespace::PAIR(x);
| ^~~~
../../platforms/common/include/px4_platform_common/param_macros.h:45:36: note: in expansion of macro ‘_DEFINE_SINGLE_PARAMETER’
45 | #define APPLY2(t, aaa, aab) t(aaa) t(aab)
| ^
../../platforms/common/include/px4_platform_common/param_macros.h:197:33: note: in expansion of macro ‘APPLY2’
197 | #define APPLY_ALL_H3(t, n, …) APPLY##n(t, __VA_ARGS__)
| ^~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:198:33: note: in expansion of macro ‘APPLY_ALL_H3’
198 | #define APPLY_ALL_H2(t, n, …) APPLY_ALL_H3(t, n, __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:199:27: note: in expansion of macro ‘APPLY_ALL_H2’
199 | #define APPLY_ALL(t, …) APPLY_ALL_H2(t, NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:81:2: note: in expansion of macro ‘APPLY_ALL’
81 | APPLY_ALL(_DEFINE_SINGLE_PARAMETER, __VA_ARGS__)
| ^~~~~~~~~
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:68:2: note: in expansion of macro ‘DEFINE_PARAMETERS’
68 | DEFINE_PARAMETERS(
| ^~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
and
[707/1094] Building CXX object src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj
FAILED: src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj
/usr/bin/ccache /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4_FMU_V6X -DMODULE_NAME="flight_mode_manager" -DPX4_MAIN=flight_mode_manager_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I../../boards/px4/fmu-v6x/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc/lib -I../../platforms/nuttx/src/px4/stm/stm32h7/include -I../../platforms/common -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/matrix -I../../src/modules -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/armv7-m -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/chip -I../../platforms/nuttx/NuttX/nuttx/arch/arm/src/common -I../../platforms/nuttx/NuttX/apps/include -Iexternal/Install/include -I../../src/modules/flight_mode_manager -Isrc/modules/flight_mode_manager -I../../src/modules/flight_mode_manager/tasks/Auto -I../../src/modules/flight_mode_manager/tasks/FlightTask -I../../src/modules/flight_mode_manager/tasks/Utility -I../../src/lib/slew_rate -I../../src/lib/motion_planning -I../../src/modules/flight_mode_manager/tasks/Descend -I../../src/modules/flight_mode_manager/tasks/Failsafe -I../../src/modules/flight_mode_manager/tasks/ManualAcceleration -I../../src/modules/flight_mode_manager/tasks/ManualAltitudeSmoothVel -I../../src/modules/flight_mode_manager/tasks/ManualAltitude -I../../src/modules/flight_mode_manager/tasks/ManualPosition -I../../src/modules/flight_mode_manager/tasks/ManualPositionSmoothVel -I../../src/modules/flight_mode_manager/tasks/Transition -I../../src/modules/flight_mode_manager/tasks/AutoFollowTarget -I../../src/modules/flight_mode_manager/tasks/Orbit -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include/cxx -isystem ../../platforms/nuttx/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -Wreorder -Wno-overloaded-virtual -fno-rtti -fno-exceptions -fno-sized-deallocation -fno-threadsafe-statics -nostdinc++ -Wno-cast-align -Wframe-larger-than=2048 -D__KERNEL__ -std=gnu++14 -MD -MT src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj -MF src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj.d -o src/modules/flight_mode_manager/CMakeFiles/modules__flight_mode_manager.dir/FlightTasks_generated.cpp.obj -c src/modules/flight_mode_manager/FlightTasks_generated.cpp
In file included from ../../platforms/common/include/px4_platform_common/param.h:42,
from ../../platforms/common/include/px4_platform_common/module_params.h:44,
from ../../src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.hpp:44,
from ../../src/modules/flight_mode_manager/FlightModeManager.hpp:36,
from src/modules/flight_mode_manager/FlightTasks_generated.cpp:42:
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:70:28: error: ‘MC_MAN_TILT_TAU’ is not a member of ‘px4::params’; did you mean ‘MPC_MAN_TILT_MAX’?
70 | (ParamFloat<px4::params::MC_MAN_TILT_TAU>) _param_mc_man_tilt_tau ///< time constant for stick filter
| ^~~~~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:239:18: note: in definition of macro ‘REM’
239 | #define REM(…) __VA_ARGS__
| ^~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:60:40: note: in expansion of macro ‘PAIR’
60 | do_not_explicitly_use_this_namespace::PAIR(x);
| ^~~~
../../platforms/common/include/px4_platform_common/param_macros.h:45:36: note: in expansion of macro ‘_DEFINE_SINGLE_PARAMETER’
45 | #define APPLY2(t, aaa, aab) t(aaa) t(aab)
| ^
../../platforms/common/include/px4_platform_common/param_macros.h:197:33: note: in expansion of macro ‘APPLY2’
197 | #define APPLY_ALL_H3(t, n, …) APPLY##n(t, __VA_ARGS__)
| ^~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:198:33: note: in expansion of macro ‘APPLY_ALL_H3’
198 | #define APPLY_ALL_H2(t, n, …) APPLY_ALL_H3(t, n, __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param_macros.h:199:27: note: in expansion of macro ‘APPLY_ALL_H2’
199 | #define APPLY_ALL(t, …) APPLY_ALL_H2(t, NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
| ^~~~~~~~~~~~
../../platforms/common/include/px4_platform_common/param.h:81:2: note: in expansion of macro ‘APPLY_ALL’
81 | APPLY_ALL(_DEFINE_SINGLE_PARAMETER, __VA_ARGS__)
| ^~~~~~~~~
../../src/modules/flight_mode_manager/tasks/Utility/StickTiltXY.hpp:68:2: note: in expansion of macro ‘DEFINE_PARAMETERS’
68 | DEFINE_PARAMETERS(
| ^~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
Have you met this issue before and how did you solve it?
any suggestions or advices are welcome.
Thanks in advance.
Y.Z. px4, simulink, pixhawk, uav, firmware MATLAB Answers — New Questions
Looking for help with labelling groups
Hey everyone,
so far I’ve read all Matlab entrys on adding/creating categories and/or labels but I haven’t found something fitting that works for me. I have a set of data in 178×13 double format, the variable names in a 1×13 cell format and the group classification in a 178×1 double, which ist just 1 2 and 3. In different projects I had a 178×1 cell instead containing the names of the groups and I would use that to generate a double using findgroups. However, now I would like to do the reverse action and generate a 178×1 cell value with the names instead of numbers. Num2Cell does not work here of course because I would like to tell Matlab to put "GroupA" for every 1 in the group classification 178×1 double and "GroupB" for every 2 and GroupC for every 3. I have information that the first 59 belog to GroupA etc, but I don’t know how to implement that either. Maybe it’s the language barrier but I really don’t even know what to search for anymore. Any help is much appreciated!Hey everyone,
so far I’ve read all Matlab entrys on adding/creating categories and/or labels but I haven’t found something fitting that works for me. I have a set of data in 178×13 double format, the variable names in a 1×13 cell format and the group classification in a 178×1 double, which ist just 1 2 and 3. In different projects I had a 178×1 cell instead containing the names of the groups and I would use that to generate a double using findgroups. However, now I would like to do the reverse action and generate a 178×1 cell value with the names instead of numbers. Num2Cell does not work here of course because I would like to tell Matlab to put "GroupA" for every 1 in the group classification 178×1 double and "GroupB" for every 2 and GroupC for every 3. I have information that the first 59 belog to GroupA etc, but I don’t know how to implement that either. Maybe it’s the language barrier but I really don’t even know what to search for anymore. Any help is much appreciated! Hey everyone,
so far I’ve read all Matlab entrys on adding/creating categories and/or labels but I haven’t found something fitting that works for me. I have a set of data in 178×13 double format, the variable names in a 1×13 cell format and the group classification in a 178×1 double, which ist just 1 2 and 3. In different projects I had a 178×1 cell instead containing the names of the groups and I would use that to generate a double using findgroups. However, now I would like to do the reverse action and generate a 178×1 cell value with the names instead of numbers. Num2Cell does not work here of course because I would like to tell Matlab to put "GroupA" for every 1 in the group classification 178×1 double and "GroupB" for every 2 and GroupC for every 3. I have information that the first 59 belog to GroupA etc, but I don’t know how to implement that either. Maybe it’s the language barrier but I really don’t even know what to search for anymore. Any help is much appreciated! groups, classes, label MATLAB Answers — New Questions
大学とMathworks間のライセンスでmatlabをserver上で動作させていましたが、突然、ライセンスexpireとのmessage(License Manager Error -10)が出て動作しません。
東京大学ーMathworks間のライセンスの下で私のアカウントで稼働していたmatlabが急に以下のmessageが出て動かなくなりました。
(anaconda3-2022.05)sekigh@1de7b0766802:/external_disk_3/container_3/home/sekigh/Windowsfolder$ matlab
License checkout failed.
License Manager Error -10
Your license for MATLAB has expired.
If you are not using a trial license contact your License Administrator to obtain an updated license.
Otherwise, contact your Sales Representative for a trial extension.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/10
Diagnostic Information:
Feature: MATLAB
License path: /home/sekigh/.matlab/R2023a_licenses/license_1de7b0766802_40790257_R2023a.lic:/usr/local/MATLAB/R2023a/licenses/license.dat:/usr/local/MATLAB/R2023a/licenses
Licensing error: -10,32.
(anaconda3-2022.05)sekigh@1de7b0766802:/external_disk_3/container_3/home/sekigh/Windowsfolder$
このserver以外でも私のアカウントでmatlabが2台installされており、それは正常に稼働しています。ライセンスをactivateする方法を教授ください。東京大学ーMathworks間のライセンスの下で私のアカウントで稼働していたmatlabが急に以下のmessageが出て動かなくなりました。
(anaconda3-2022.05)sekigh@1de7b0766802:/external_disk_3/container_3/home/sekigh/Windowsfolder$ matlab
License checkout failed.
License Manager Error -10
Your license for MATLAB has expired.
If you are not using a trial license contact your License Administrator to obtain an updated license.
Otherwise, contact your Sales Representative for a trial extension.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/10
Diagnostic Information:
Feature: MATLAB
License path: /home/sekigh/.matlab/R2023a_licenses/license_1de7b0766802_40790257_R2023a.lic:/usr/local/MATLAB/R2023a/licenses/license.dat:/usr/local/MATLAB/R2023a/licenses
Licensing error: -10,32.
(anaconda3-2022.05)sekigh@1de7b0766802:/external_disk_3/container_3/home/sekigh/Windowsfolder$
このserver以外でも私のアカウントでmatlabが2台installされており、それは正常に稼働しています。ライセンスをactivateする方法を教授ください。 東京大学ーMathworks間のライセンスの下で私のアカウントで稼働していたmatlabが急に以下のmessageが出て動かなくなりました。
(anaconda3-2022.05)sekigh@1de7b0766802:/external_disk_3/container_3/home/sekigh/Windowsfolder$ matlab
License checkout failed.
License Manager Error -10
Your license for MATLAB has expired.
If you are not using a trial license contact your License Administrator to obtain an updated license.
Otherwise, contact your Sales Representative for a trial extension.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/10
Diagnostic Information:
Feature: MATLAB
License path: /home/sekigh/.matlab/R2023a_licenses/license_1de7b0766802_40790257_R2023a.lic:/usr/local/MATLAB/R2023a/licenses/license.dat:/usr/local/MATLAB/R2023a/licenses
Licensing error: -10,32.
(anaconda3-2022.05)sekigh@1de7b0766802:/external_disk_3/container_3/home/sekigh/Windowsfolder$
このserver以外でも私のアカウントでmatlabが2台installされており、それは正常に稼働しています。ライセンスをactivateする方法を教授ください。 ライセンス エクスパイア MATLAB Answers — New Questions
Control quiver arrow head width vs height.
Hi, I have a quiver plot where the arrow heads are incredibly wide by default, so I used "MaxHeadSize" to shrink them to a reasonable size. Also, the scaling behavior is set to 0 because I want them to connect the way they do currently. The downside is that now, instead of looking like arrowheads, they almost look like horizontal bars. I’m wondering if there is a way to control the head length independently of the head width.Hi, I have a quiver plot where the arrow heads are incredibly wide by default, so I used "MaxHeadSize" to shrink them to a reasonable size. Also, the scaling behavior is set to 0 because I want them to connect the way they do currently. The downside is that now, instead of looking like arrowheads, they almost look like horizontal bars. I’m wondering if there is a way to control the head length independently of the head width. Hi, I have a quiver plot where the arrow heads are incredibly wide by default, so I used "MaxHeadSize" to shrink them to a reasonable size. Also, the scaling behavior is set to 0 because I want them to connect the way they do currently. The downside is that now, instead of looking like arrowheads, they almost look like horizontal bars. I’m wondering if there is a way to control the head length independently of the head width. quiver, matlab, graph MATLAB Answers — New Questions
How to search array in array same values?
Hello,
I create an array below;
bigArray = rand(1,150);
bigArray(1,15:19) = [1 1 1 1 1]’;
bigArray(1,25:29) = [1 1 1 1 1]’;
bigArray(1,75:79) = [1 1 1 1 1]’;
bigArray(1,105:109) = [1 1 1 1 1]’;
bigArray(1,65) = 1;
bigArray(1,5:6) = [1 1]’;
I want to find [1 1 1 1 1]’ array indexes. But I run the code;
idx = find(ismember(bigArray,[1 1 1 1 1]’))
I want to see as an output; [15 16 17 18 19 25 26 27 28 29 75 76 77 78 79 105 106 107 108 109]Hello,
I create an array below;
bigArray = rand(1,150);
bigArray(1,15:19) = [1 1 1 1 1]’;
bigArray(1,25:29) = [1 1 1 1 1]’;
bigArray(1,75:79) = [1 1 1 1 1]’;
bigArray(1,105:109) = [1 1 1 1 1]’;
bigArray(1,65) = 1;
bigArray(1,5:6) = [1 1]’;
I want to find [1 1 1 1 1]’ array indexes. But I run the code;
idx = find(ismember(bigArray,[1 1 1 1 1]’))
I want to see as an output; [15 16 17 18 19 25 26 27 28 29 75 76 77 78 79 105 106 107 108 109] Hello,
I create an array below;
bigArray = rand(1,150);
bigArray(1,15:19) = [1 1 1 1 1]’;
bigArray(1,25:29) = [1 1 1 1 1]’;
bigArray(1,75:79) = [1 1 1 1 1]’;
bigArray(1,105:109) = [1 1 1 1 1]’;
bigArray(1,65) = 1;
bigArray(1,5:6) = [1 1]’;
I want to find [1 1 1 1 1]’ array indexes. But I run the code;
idx = find(ismember(bigArray,[1 1 1 1 1]’))
I want to see as an output; [15 16 17 18 19 25 26 27 28 29 75 76 77 78 79 105 106 107 108 109] matlab, array, find, indexing MATLAB Answers — New Questions
Create a generic x for (x,y) plot
I’m not well versed in matlab at all so hopefully this post makes some sense.
I have tons of data in .txt files that I want to plot. However the only "x" data set that I have is the real life time which I can’t use in my plot(x,y) command since the numbers are 10:23:55, for example. Since the x-axis is just time,I want to make a generic x dataset with a command with which the x gets the same length as the y data sets. Hopefully someone can help me with thisI’m not well versed in matlab at all so hopefully this post makes some sense.
I have tons of data in .txt files that I want to plot. However the only "x" data set that I have is the real life time which I can’t use in my plot(x,y) command since the numbers are 10:23:55, for example. Since the x-axis is just time,I want to make a generic x dataset with a command with which the x gets the same length as the y data sets. Hopefully someone can help me with this I’m not well versed in matlab at all so hopefully this post makes some sense.
I have tons of data in .txt files that I want to plot. However the only "x" data set that I have is the real life time which I can’t use in my plot(x,y) command since the numbers are 10:23:55, for example. Since the x-axis is just time,I want to make a generic x dataset with a command with which the x gets the same length as the y data sets. Hopefully someone can help me with this plotting MATLAB Answers — New Questions
Simulink Debug brings up two Visual studio sessions
I ran into issues when trying to debug c caller code in simulink. environment: Matlab 2022a, Visual Studio Community 2019.
When Debug-> Add Breakpoint -> set breakpoint in custom code , two sessions of Visual Studio were brough up. The code I was debugging did not show in the module view in one of the sessions, so the breakpoint did not work. The other session has the module loaded , but looks like the thread was not attached to the actual simulation ( even though it showed as attached. )
Anybody has a solution or suggestion ?I ran into issues when trying to debug c caller code in simulink. environment: Matlab 2022a, Visual Studio Community 2019.
When Debug-> Add Breakpoint -> set breakpoint in custom code , two sessions of Visual Studio were brough up. The code I was debugging did not show in the module view in one of the sessions, so the breakpoint did not work. The other session has the module loaded , but looks like the thread was not attached to the actual simulation ( even though it showed as attached. )
Anybody has a solution or suggestion ? I ran into issues when trying to debug c caller code in simulink. environment: Matlab 2022a, Visual Studio Community 2019.
When Debug-> Add Breakpoint -> set breakpoint in custom code , two sessions of Visual Studio were brough up. The code I was debugging did not show in the module view in one of the sessions, so the breakpoint did not work. The other session has the module loaded , but looks like the thread was not attached to the actual simulation ( even though it showed as attached. )
Anybody has a solution or suggestion ? c debug MATLAB Answers — New Questions
Colon operands must be real scalars
I tested the following code:
x = rand(1,3);
x([1,2]:[1,2])
In R2024a it gives a warning but it is ok in R2023b! Some existing code that I use relies on this feature. Any reason why it will become an error in the future?
For a better example of how using non-scalar colon operands may be useful:
clear,clc
Params.agejshifter.College=21;
Params.J.College=100-Params.agejshifter.College;
Params.agej.College=1:1:Params.J.College;
Params.J.College=100-Params.agejshifter.College; % Age ends at 100
dj_temp=interp1([0,30,60,65,70,100],[0.00587,0.00116,0.01086,0.01753,0.02785,0.39134],0:1:100,’linear’);
Params.sj.College=1-dj_temp((Params.agej.College+Params.agejshifter.College):100);I tested the following code:
x = rand(1,3);
x([1,2]:[1,2])
In R2024a it gives a warning but it is ok in R2023b! Some existing code that I use relies on this feature. Any reason why it will become an error in the future?
For a better example of how using non-scalar colon operands may be useful:
clear,clc
Params.agejshifter.College=21;
Params.J.College=100-Params.agejshifter.College;
Params.agej.College=1:1:Params.J.College;
Params.J.College=100-Params.agejshifter.College; % Age ends at 100
dj_temp=interp1([0,30,60,65,70,100],[0.00587,0.00116,0.01086,0.01753,0.02785,0.39134],0:1:100,’linear’);
Params.sj.College=1-dj_temp((Params.agej.College+Params.agejshifter.College):100); I tested the following code:
x = rand(1,3);
x([1,2]:[1,2])
In R2024a it gives a warning but it is ok in R2023b! Some existing code that I use relies on this feature. Any reason why it will become an error in the future?
For a better example of how using non-scalar colon operands may be useful:
clear,clc
Params.agejshifter.College=21;
Params.J.College=100-Params.agejshifter.College;
Params.agej.College=1:1:Params.J.College;
Params.J.College=100-Params.agejshifter.College; % Age ends at 100
dj_temp=interp1([0,30,60,65,70,100],[0.00587,0.00116,0.01086,0.01753,0.02785,0.39134],0:1:100,’linear’);
Params.sj.College=1-dj_temp((Params.agej.College+Params.agejshifter.College):100); colon, array indexing MATLAB Answers — New Questions
Pre-commit on Gitlab with Matlab files
I would like to add a pre-commit check for a Matlab project that is on Gitlab.
Is there a template for the pre-commit-config.yaml ? What are the hooks that would work with Matlab files ?
For example, for avoiding repeated code, formatting the code, making sure that all variables are written in CamelCase, making sure that the names of variables are understandable enough.I would like to add a pre-commit check for a Matlab project that is on Gitlab.
Is there a template for the pre-commit-config.yaml ? What are the hooks that would work with Matlab files ?
For example, for avoiding repeated code, formatting the code, making sure that all variables are written in CamelCase, making sure that the names of variables are understandable enough. I would like to add a pre-commit check for a Matlab project that is on Gitlab.
Is there a template for the pre-commit-config.yaml ? What are the hooks that would work with Matlab files ?
For example, for avoiding repeated code, formatting the code, making sure that all variables are written in CamelCase, making sure that the names of variables are understandable enough. pre-commit, gitlab MATLAB Answers — New Questions
Heatmap doesn’t show the values
The heatmap figures I used to plot on Matlab had the values labeled in each cell (just like the documenation says), but now the figure doesn’t include the text. I’m not sure if I made changes to some settings. Does anyone know what the issue is?
For instance, I get the correct output here, when I run the following on web.
figure
heatmap(magic(5)); colormap(sky)
But this is what I get when I run this locally on my computer.
** EDIT: I run 2024aThe heatmap figures I used to plot on Matlab had the values labeled in each cell (just like the documenation says), but now the figure doesn’t include the text. I’m not sure if I made changes to some settings. Does anyone know what the issue is?
For instance, I get the correct output here, when I run the following on web.
figure
heatmap(magic(5)); colormap(sky)
But this is what I get when I run this locally on my computer.
** EDIT: I run 2024a The heatmap figures I used to plot on Matlab had the values labeled in each cell (just like the documenation says), but now the figure doesn’t include the text. I’m not sure if I made changes to some settings. Does anyone know what the issue is?
For instance, I get the correct output here, when I run the following on web.
figure
heatmap(magic(5)); colormap(sky)
But this is what I get when I run this locally on my computer.
** EDIT: I run 2024a heatmap, labels MATLAB Answers — New Questions
Unable to load product files. Product files must be in the same folder as the input file.
Note: I am trying to install Matlab on the Ubuntu server which doesn’t have desktop.
I can only use Ubuntu terminal.
I downloaded R2022a installer for Linux and unzipped it.
The path of directory was
/home/matlab_R2022a_glnxa64
I modified /home/matlab_R2022a_glnxa64/installer_input.txt
fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx
licensePath=license.lic # I downloaded license file after activating the hostID
agreeToLicense=yes
I typed installation script in the directory: /home/matlab_R2022a_glnxa64
My installation script was
bash install -inputFile installer_input.txt
The log was
(Aug 09, 2022 15:54:07) Session key: xxx-xxx-xxx-…
(Aug 09, 2022 15:54:07) Product Files Folder: /home/matlab_R2022a_glnxa64/archives
(Aug 09, 2022 15:54:07) License Agreement validation is successful.
(Aug 09, 2022 15:54:07) Unable to load product files. Product files must be in the same folder as the input file.
For help getting the product files, see the installation documentation on
<a HREF="https://www.mathworks.com/pi_noprode_mpi_R2022a_glnxa64">MATLAB Answer</a>.
(Aug 09, 2022 15:54:07) Exiting with status -2
(Aug 09, 2022 15:54:07) End – Unsuccessful
In the /home/matlab_R2022a_glnxa64/archives, there are 2 folders
– /home/matlab_R2022a_glnxa64/archives
– common
– Network_License_Manager111621_common.zip
– glnxa64
– Network_License_Manager111621_glnxa64.zip
I couldn’t find any useful solution yet from "MathWorks Support Team".
What is the "product files" in the log and where can I find it?
P.S.
I tried to install with ISO file.
But since the mounted directory of the ISO file was read-only, I could not modify installer_input.txt.
So, I failed with it as well.Note: I am trying to install Matlab on the Ubuntu server which doesn’t have desktop.
I can only use Ubuntu terminal.
I downloaded R2022a installer for Linux and unzipped it.
The path of directory was
/home/matlab_R2022a_glnxa64
I modified /home/matlab_R2022a_glnxa64/installer_input.txt
fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx
licensePath=license.lic # I downloaded license file after activating the hostID
agreeToLicense=yes
I typed installation script in the directory: /home/matlab_R2022a_glnxa64
My installation script was
bash install -inputFile installer_input.txt
The log was
(Aug 09, 2022 15:54:07) Session key: xxx-xxx-xxx-…
(Aug 09, 2022 15:54:07) Product Files Folder: /home/matlab_R2022a_glnxa64/archives
(Aug 09, 2022 15:54:07) License Agreement validation is successful.
(Aug 09, 2022 15:54:07) Unable to load product files. Product files must be in the same folder as the input file.
For help getting the product files, see the installation documentation on
<a HREF="https://www.mathworks.com/pi_noprode_mpi_R2022a_glnxa64">MATLAB Answer</a>.
(Aug 09, 2022 15:54:07) Exiting with status -2
(Aug 09, 2022 15:54:07) End – Unsuccessful
In the /home/matlab_R2022a_glnxa64/archives, there are 2 folders
– /home/matlab_R2022a_glnxa64/archives
– common
– Network_License_Manager111621_common.zip
– glnxa64
– Network_License_Manager111621_glnxa64.zip
I couldn’t find any useful solution yet from "MathWorks Support Team".
What is the "product files" in the log and where can I find it?
P.S.
I tried to install with ISO file.
But since the mounted directory of the ISO file was read-only, I could not modify installer_input.txt.
So, I failed with it as well. Note: I am trying to install Matlab on the Ubuntu server which doesn’t have desktop.
I can only use Ubuntu terminal.
I downloaded R2022a installer for Linux and unzipped it.
The path of directory was
/home/matlab_R2022a_glnxa64
I modified /home/matlab_R2022a_glnxa64/installer_input.txt
fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx
licensePath=license.lic # I downloaded license file after activating the hostID
agreeToLicense=yes
I typed installation script in the directory: /home/matlab_R2022a_glnxa64
My installation script was
bash install -inputFile installer_input.txt
The log was
(Aug 09, 2022 15:54:07) Session key: xxx-xxx-xxx-…
(Aug 09, 2022 15:54:07) Product Files Folder: /home/matlab_R2022a_glnxa64/archives
(Aug 09, 2022 15:54:07) License Agreement validation is successful.
(Aug 09, 2022 15:54:07) Unable to load product files. Product files must be in the same folder as the input file.
For help getting the product files, see the installation documentation on
<a HREF="https://www.mathworks.com/pi_noprode_mpi_R2022a_glnxa64">MATLAB Answer</a>.
(Aug 09, 2022 15:54:07) Exiting with status -2
(Aug 09, 2022 15:54:07) End – Unsuccessful
In the /home/matlab_R2022a_glnxa64/archives, there are 2 folders
– /home/matlab_R2022a_glnxa64/archives
– common
– Network_License_Manager111621_common.zip
– glnxa64
– Network_License_Manager111621_glnxa64.zip
I couldn’t find any useful solution yet from "MathWorks Support Team".
What is the "product files" in the log and where can I find it?
P.S.
I tried to install with ISO file.
But since the mounted directory of the ISO file was read-only, I could not modify installer_input.txt.
So, I failed with it as well. installation, product files MATLAB Answers — New Questions
Multiplication of a Sparse Matrix With Diagonal Matrices
I have a sparse m x m square matrix L (which is actually a Laplacian matrix of a large graph) and an m x1 vector d. I want to create a diaognal matrix D whose diagonal is populated with the entries in d and then generate
normL = D * L * D
Currently, I am creating a sparse diaognal matrix as
D = spdiags(d, 0, m, m)
and then I use D * L * D.
I wonder whether there is a more efficient way to do this given that the (i, j)-th elements of normL and L are related by
normL(i, j) = D(i) * D(j) * L(i, j).
Thank you very much.I have a sparse m x m square matrix L (which is actually a Laplacian matrix of a large graph) and an m x1 vector d. I want to create a diaognal matrix D whose diagonal is populated with the entries in d and then generate
normL = D * L * D
Currently, I am creating a sparse diaognal matrix as
D = spdiags(d, 0, m, m)
and then I use D * L * D.
I wonder whether there is a more efficient way to do this given that the (i, j)-th elements of normL and L are related by
normL(i, j) = D(i) * D(j) * L(i, j).
Thank you very much. I have a sparse m x m square matrix L (which is actually a Laplacian matrix of a large graph) and an m x1 vector d. I want to create a diaognal matrix D whose diagonal is populated with the entries in d and then generate
normL = D * L * D
Currently, I am creating a sparse diaognal matrix as
D = spdiags(d, 0, m, m)
and then I use D * L * D.
I wonder whether there is a more efficient way to do this given that the (i, j)-th elements of normL and L are related by
normL(i, j) = D(i) * D(j) * L(i, j).
Thank you very much. sparse diagonal matrix, sparse matrix multiplication MATLAB Answers — New Questions
Using hNRReferenceWaveformGenerator with TDD actual pattern
Hi Matlab,
3GPP UL waveforms when generated from 5G Toolboxes, fill only slots which is defined from 3GPP. we also need special subframe with 4 symbols UL enabled. Let me know if we can fill special subrame when exact UL symbols.
// Matlab outputs :
hNRReferenceWaveformGenerator(ulnrref,bw,scs,dm,ncellid);
G-FR1-A1-5, 100MHz, 30kHz, TDD, 1
ulrefwaveformgen.Config.PUSCH{1, 1}.SymbolAllocation = [0,14]
ulrefwaveformgen.Config.PUSCH{1, 1}.SlotAllocation = [8,9,18,19]
// 3GPP defined TDD pattern.
38.141 : Table 4.9.2.2-1: Configurations of TDD for BS type 1-C and BS type 1-H test models
Field name Value
referenceSubcarrierSpacing (kHz) 15 30 60
Periodicity (ms) for dl-UL-TransmissionPeriodicity 5 5 5
nrofDownlinkSlots 3 7 14
nrofDownlinkSymbols 10 6 12
nrofUplinkSlots 1 2 4
nrofUplinkSymbols 2 4 8Hi Matlab,
3GPP UL waveforms when generated from 5G Toolboxes, fill only slots which is defined from 3GPP. we also need special subframe with 4 symbols UL enabled. Let me know if we can fill special subrame when exact UL symbols.
// Matlab outputs :
hNRReferenceWaveformGenerator(ulnrref,bw,scs,dm,ncellid);
G-FR1-A1-5, 100MHz, 30kHz, TDD, 1
ulrefwaveformgen.Config.PUSCH{1, 1}.SymbolAllocation = [0,14]
ulrefwaveformgen.Config.PUSCH{1, 1}.SlotAllocation = [8,9,18,19]
// 3GPP defined TDD pattern.
38.141 : Table 4.9.2.2-1: Configurations of TDD for BS type 1-C and BS type 1-H test models
Field name Value
referenceSubcarrierSpacing (kHz) 15 30 60
Periodicity (ms) for dl-UL-TransmissionPeriodicity 5 5 5
nrofDownlinkSlots 3 7 14
nrofDownlinkSymbols 10 6 12
nrofUplinkSlots 1 2 4
nrofUplinkSymbols 2 4 8 Hi Matlab,
3GPP UL waveforms when generated from 5G Toolboxes, fill only slots which is defined from 3GPP. we also need special subframe with 4 symbols UL enabled. Let me know if we can fill special subrame when exact UL symbols.
// Matlab outputs :
hNRReferenceWaveformGenerator(ulnrref,bw,scs,dm,ncellid);
G-FR1-A1-5, 100MHz, 30kHz, TDD, 1
ulrefwaveformgen.Config.PUSCH{1, 1}.SymbolAllocation = [0,14]
ulrefwaveformgen.Config.PUSCH{1, 1}.SlotAllocation = [8,9,18,19]
// 3GPP defined TDD pattern.
38.141 : Table 4.9.2.2-1: Configurations of TDD for BS type 1-C and BS type 1-H test models
Field name Value
referenceSubcarrierSpacing (kHz) 15 30 60
Periodicity (ms) for dl-UL-TransmissionPeriodicity 5 5 5
nrofDownlinkSlots 3 7 14
nrofDownlinkSymbols 10 6 12
nrofUplinkSlots 1 2 4
nrofUplinkSymbols 2 4 8 hnrreferencewaveformgenerator MATLAB Answers — New Questions
Import geopolyshape from gdb fails
Hi,
I’m completly new to Matlabs.
I’m trying to load my buildings into the siteviewer, to create a rf propagation in the end.
But I just can’t get my buildings to load. My features are in a esri .gdb an in the coordinate system is WGS_1984.
The features are 3d buildings and are of the type esrie multipatch. The level of detail is only 1, so LOD1 (building blocks without roof).
Code to load:
geo = readgeotable("D:Arbeit3D_Ausleuchtung3D_AusleuchtungDatenDaten_1.gdb", CoordinateSystemType="geographic");
viewer = siteviewer(Buildings=geo, Basemap="topographic");
If I try to load these into the siteviewer I get the following error:
"Error using siteviewer
The coordinates of the input points must be finite values; Inf and NaN are not permitted."
I tried converting the features to kmz an import them, but the error is still the same.
I managed to load the sideviewer with only one feature out of my buildings. So some features are OK, some not to import into sideviewer.
All my features are fine in other gis, like arcgis pro or qgis.
But the one building I can load is floating, I don’t know if this is beacause no terrain moddel is loaded or if there is a property to map them to the ground.
Can anyone help me or give me a hint in the right direction?
thanks, sebastianHi,
I’m completly new to Matlabs.
I’m trying to load my buildings into the siteviewer, to create a rf propagation in the end.
But I just can’t get my buildings to load. My features are in a esri .gdb an in the coordinate system is WGS_1984.
The features are 3d buildings and are of the type esrie multipatch. The level of detail is only 1, so LOD1 (building blocks without roof).
Code to load:
geo = readgeotable("D:Arbeit3D_Ausleuchtung3D_AusleuchtungDatenDaten_1.gdb", CoordinateSystemType="geographic");
viewer = siteviewer(Buildings=geo, Basemap="topographic");
If I try to load these into the siteviewer I get the following error:
"Error using siteviewer
The coordinates of the input points must be finite values; Inf and NaN are not permitted."
I tried converting the features to kmz an import them, but the error is still the same.
I managed to load the sideviewer with only one feature out of my buildings. So some features are OK, some not to import into sideviewer.
All my features are fine in other gis, like arcgis pro or qgis.
But the one building I can load is floating, I don’t know if this is beacause no terrain moddel is loaded or if there is a property to map them to the ground.
Can anyone help me or give me a hint in the right direction?
thanks, sebastian Hi,
I’m completly new to Matlabs.
I’m trying to load my buildings into the siteviewer, to create a rf propagation in the end.
But I just can’t get my buildings to load. My features are in a esri .gdb an in the coordinate system is WGS_1984.
The features are 3d buildings and are of the type esrie multipatch. The level of detail is only 1, so LOD1 (building blocks without roof).
Code to load:
geo = readgeotable("D:Arbeit3D_Ausleuchtung3D_AusleuchtungDatenDaten_1.gdb", CoordinateSystemType="geographic");
viewer = siteviewer(Buildings=geo, Basemap="topographic");
If I try to load these into the siteviewer I get the following error:
"Error using siteviewer
The coordinates of the input points must be finite values; Inf and NaN are not permitted."
I tried converting the features to kmz an import them, but the error is still the same.
I managed to load the sideviewer with only one feature out of my buildings. So some features are OK, some not to import into sideviewer.
All my features are fine in other gis, like arcgis pro or qgis.
But the one building I can load is floating, I don’t know if this is beacause no terrain moddel is loaded or if there is a property to map them to the ground.
Can anyone help me or give me a hint in the right direction?
thanks, sebastian geo, geopolyshape, antenna, gdb, readgeotable MATLAB Answers — New Questions
atan2 does not accept complex numbers as input
Good Morning
If I’m not mistaken I think that there is a definition of the atan2() function also in the complex field.
If so , It is possible to implement a complex version of the atan2() function ?
i mean in a way that i can compute atan2(a+i*b , c+i*d) , where a,b,c,d are real and i =sqrt(-1) ,
this both numerically and symbolically
thankyou 🙂
Kind regards
Manu1965@wail.chGood Morning
If I’m not mistaken I think that there is a definition of the atan2() function also in the complex field.
If so , It is possible to implement a complex version of the atan2() function ?
i mean in a way that i can compute atan2(a+i*b , c+i*d) , where a,b,c,d are real and i =sqrt(-1) ,
this both numerically and symbolically
thankyou 🙂
Kind regards
Manu1965@wail.ch Good Morning
If I’m not mistaken I think that there is a definition of the atan2() function also in the complex field.
If so , It is possible to implement a complex version of the atan2() function ?
i mean in a way that i can compute atan2(a+i*b , c+i*d) , where a,b,c,d are real and i =sqrt(-1) ,
this both numerically and symbolically
thankyou 🙂
Kind regards
Manu1965@wail.ch atan2() complex version MATLAB Answers — New Questions
Sending information to MATLAB from Python via TCP
I want to send data from Python to MATLAB every 10 seconds via TCP. The code I have works for the first iteration of the loop, but on the second iteration we reestablish the connection, yet the data fails to send.
The relevant Python code is:
import socket
import sys
import time
%Create a TCP/IP socket
i = 0 %loop counter
j=45.395 %data to be sent to MATLAB
while i < 1000:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((‘localhost’, 51001))
s.listen(1)
conn, addr = s.accept()
print(f"Connected by {addr}")
conn.sendall(bytes(str(j), ‘ASCII’))
conn.close()
i+=1
j+=0.6
time.sleep(10)
The MATLAB code is
i=0;
while i < 1000
t = tcpclient(‘localhost’, 51001);
output = read(t);
data = char(output(1:4));
pwrcmd = str2double(data);
fprintf(‘%f’, pwrcmd);
clear t;
i = i+1;
pause(10)
end
and finally the output on the terminal is:
>python matlab_connect_test.py
Connected by (‘127.0.0.1’, 56010)
Connected by (‘127.0.0.1’, 56012)
The first thing I tried was to establish just one server-client connection, and send data every 10 seconds through that one connection, rather than reconnecting every 10 seconds. That was unsuccessful. For some reason even though the second connection is established, MATLAB never receives the second value of j, or any subsequent values. Any help would be very much appreciated.I want to send data from Python to MATLAB every 10 seconds via TCP. The code I have works for the first iteration of the loop, but on the second iteration we reestablish the connection, yet the data fails to send.
The relevant Python code is:
import socket
import sys
import time
%Create a TCP/IP socket
i = 0 %loop counter
j=45.395 %data to be sent to MATLAB
while i < 1000:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((‘localhost’, 51001))
s.listen(1)
conn, addr = s.accept()
print(f"Connected by {addr}")
conn.sendall(bytes(str(j), ‘ASCII’))
conn.close()
i+=1
j+=0.6
time.sleep(10)
The MATLAB code is
i=0;
while i < 1000
t = tcpclient(‘localhost’, 51001);
output = read(t);
data = char(output(1:4));
pwrcmd = str2double(data);
fprintf(‘%f’, pwrcmd);
clear t;
i = i+1;
pause(10)
end
and finally the output on the terminal is:
>python matlab_connect_test.py
Connected by (‘127.0.0.1’, 56010)
Connected by (‘127.0.0.1’, 56012)
The first thing I tried was to establish just one server-client connection, and send data every 10 seconds through that one connection, rather than reconnecting every 10 seconds. That was unsuccessful. For some reason even though the second connection is established, MATLAB never receives the second value of j, or any subsequent values. Any help would be very much appreciated. I want to send data from Python to MATLAB every 10 seconds via TCP. The code I have works for the first iteration of the loop, but on the second iteration we reestablish the connection, yet the data fails to send.
The relevant Python code is:
import socket
import sys
import time
%Create a TCP/IP socket
i = 0 %loop counter
j=45.395 %data to be sent to MATLAB
while i < 1000:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((‘localhost’, 51001))
s.listen(1)
conn, addr = s.accept()
print(f"Connected by {addr}")
conn.sendall(bytes(str(j), ‘ASCII’))
conn.close()
i+=1
j+=0.6
time.sleep(10)
The MATLAB code is
i=0;
while i < 1000
t = tcpclient(‘localhost’, 51001);
output = read(t);
data = char(output(1:4));
pwrcmd = str2double(data);
fprintf(‘%f’, pwrcmd);
clear t;
i = i+1;
pause(10)
end
and finally the output on the terminal is:
>python matlab_connect_test.py
Connected by (‘127.0.0.1’, 56010)
Connected by (‘127.0.0.1’, 56012)
The first thing I tried was to establish just one server-client connection, and send data every 10 seconds through that one connection, rather than reconnecting every 10 seconds. That was unsuccessful. For some reason even though the second connection is established, MATLAB never receives the second value of j, or any subsequent values. Any help would be very much appreciated. python, matlab, tcp, tcpclient, server MATLAB Answers — New Questions
Dear all, may I know how can we enter the extinction coefficient value in Stk?
I’m using STK system tool kit with matlab and in the laser environment we can use Beer-Lambert law by adding the extinction coefficient so suppose we have a cloud causing attenuation equals 1.2dB/km,how can I enter this value in the extinction field field in Stk, it has to be in m-1 and I have to identify the layer top.I’m using STK system tool kit with matlab and in the laser environment we can use Beer-Lambert law by adding the extinction coefficient so suppose we have a cloud causing attenuation equals 1.2dB/km,how can I enter this value in the extinction field field in Stk, it has to be in m-1 and I have to identify the layer top. I’m using STK system tool kit with matlab and in the laser environment we can use Beer-Lambert law by adding the extinction coefficient so suppose we have a cloud causing attenuation equals 1.2dB/km,how can I enter this value in the extinction field field in Stk, it has to be in m-1 and I have to identify the layer top. attenuation, cloud MATLAB Answers — New Questions