Tag Archives: matlab
How do I integrate my MATLAB Compiler SDK C or C++ shared library in Visual Studio?
I have used MATLAB Compiler SDK to compile a C/C++ library from MATLAB and I would like to integrate it into a C/C++ application in Visual Studio. How can I do this?I have used MATLAB Compiler SDK to compile a C/C++ library from MATLAB and I would like to integrate it into a C/C++ application in Visual Studio. How can I do this? I have used MATLAB Compiler SDK to compile a C/C++ library from MATLAB and I would like to integrate it into a C/C++ application in Visual Studio. How can I do this? visual, studio, compiler, sdk, dynamic, static, library MATLAB Answers — New Questions
Eliminate the long number appearing in symbolic calculations
I am doing some symbolic calculations and end up with very large numbers in the symbolic expression. For example, I get the variable "term" as the result of my calculation:
syms J1
term = J1*(6582018229284824168619876730229377341315370891042652124695852093/13164036458569648337239753460458804039861886925068638906788872192 – 4302204281461843i/81129638414606681695789005144064);
It contains these long numbers. When I use vpa(), I get the following:
vpa(term)
How can I eliminate these small numbers with imaginary parts using vpa() or any other function? They should be rounded to zero. (I don’t want to take only the real part using the real() function because these numbers can show up as real part too.)I am doing some symbolic calculations and end up with very large numbers in the symbolic expression. For example, I get the variable "term" as the result of my calculation:
syms J1
term = J1*(6582018229284824168619876730229377341315370891042652124695852093/13164036458569648337239753460458804039861886925068638906788872192 – 4302204281461843i/81129638414606681695789005144064);
It contains these long numbers. When I use vpa(), I get the following:
vpa(term)
How can I eliminate these small numbers with imaginary parts using vpa() or any other function? They should be rounded to zero. (I don’t want to take only the real part using the real() function because these numbers can show up as real part too.) I am doing some symbolic calculations and end up with very large numbers in the symbolic expression. For example, I get the variable "term" as the result of my calculation:
syms J1
term = J1*(6582018229284824168619876730229377341315370891042652124695852093/13164036458569648337239753460458804039861886925068638906788872192 – 4302204281461843i/81129638414606681695789005144064);
It contains these long numbers. When I use vpa(), I get the following:
vpa(term)
How can I eliminate these small numbers with imaginary parts using vpa() or any other function? They should be rounded to zero. (I don’t want to take only the real part using the real() function because these numbers can show up as real part too.) vpa, symbolic, round MATLAB Answers — New Questions
Scatteredinterpolant (linear) from symmetric data does not produce symmetric isolines
I utilised the scatteredinterpolant function to generate an interpolation from which I derived isolines. My data are situated on a non-equispaced grid of points that are symmetric with respect to the midline. In fact, I only have data on one side, so I placed data on the other side by copying the values from the original data set, exploiting the symmetry.
When I generate iso-lines using the NATURAL method, the isolines have a symmetric trend. If I use the simplest method, i.e. LINEAR, the iso-lines are not symmetric, which does not make sense.
Do you know what may cause this issue and how to sort it out?I utilised the scatteredinterpolant function to generate an interpolation from which I derived isolines. My data are situated on a non-equispaced grid of points that are symmetric with respect to the midline. In fact, I only have data on one side, so I placed data on the other side by copying the values from the original data set, exploiting the symmetry.
When I generate iso-lines using the NATURAL method, the isolines have a symmetric trend. If I use the simplest method, i.e. LINEAR, the iso-lines are not symmetric, which does not make sense.
Do you know what may cause this issue and how to sort it out? I utilised the scatteredinterpolant function to generate an interpolation from which I derived isolines. My data are situated on a non-equispaced grid of points that are symmetric with respect to the midline. In fact, I only have data on one side, so I placed data on the other side by copying the values from the original data set, exploiting the symmetry.
When I generate iso-lines using the NATURAL method, the isolines have a symmetric trend. If I use the simplest method, i.e. LINEAR, the iso-lines are not symmetric, which does not make sense.
Do you know what may cause this issue and how to sort it out? matlab, scatteredinterpolant, interpolation MATLAB Answers — New Questions
How to calculate the percentage of each color in this image ?
How to calculate the percentage of each color in this image ?How to calculate the percentage of each color in this image ? How to calculate the percentage of each color in this image ? image processing, image segmentation, bar chart percentages, color segmentation MATLAB Answers — New Questions
How do I deactivate MATLAB?
I need to deactivate MATLAB. How do I do this?I need to deactivate MATLAB. How do I do this? I need to deactivate MATLAB. How do I do this? MATLAB Answers — New Questions
Questions about the input X of pcolor and contourf.
I have two questions, the first one is:
In the documentation of pcolor
the input arguments X is described as follows:
x-coordinates, specified as a matrix the same size as C, or as a vector of length n, where [m,n] = size(C). The default value of X is the vector (1:n).
To create a rectangular grid of vertices, specify X as either of the following:
A vector containing values that are increasing or decreasing.
A matrix that is increasing or decreasing along one dimension and is constant along the other dimension. Set the dimension that varies to the opposite of the dimension that varies in matrix Y. You can use the meshgrid function to create the X and Y matrices.
To create a parametric grid, create a rectangular grid and pass it through a mathematical function.
But in its case of specifying Parametric Grid, X and Y don’t follow do not meet the above requirement, which is "A matrix that is increasing or decreasing along one dimension and is constant along the other dimension. Set the dimension that varies to the opposite of the dimension that varies in matrix Y."
I wonder if that means you can use X and Y coordinates for scatter points, for example:
X = [1 2 3; 2 3 4; 3 4 5]
Y = [1 1 1; 2 2 2; 3 3 3]
And the second one is:
In the documentation of contourf
x-coordinates, specified as a matrix the same size as Z, or as a vector with length n, where [m,n] = size(Z). The default value of X is the vector (1:n).
When X is a matrix, the values must be strictly increasing or decreasing along one dimension and remain constant along the other dimension. The dimension that varies must be the opposite of the dimension that varies in Y. You can use the meshgrid function to create X and Y matrices.
When X is a vector, the values must be strictly increasing or decreasing.
I wonder if that I can use X and Y coordinates for scatter points, for example:
X = [1 2 3; 2 3 4; 3 4 5]
Y = [1 1 1; 2 2 2; 3 3 3]I have two questions, the first one is:
In the documentation of pcolor
the input arguments X is described as follows:
x-coordinates, specified as a matrix the same size as C, or as a vector of length n, where [m,n] = size(C). The default value of X is the vector (1:n).
To create a rectangular grid of vertices, specify X as either of the following:
A vector containing values that are increasing or decreasing.
A matrix that is increasing or decreasing along one dimension and is constant along the other dimension. Set the dimension that varies to the opposite of the dimension that varies in matrix Y. You can use the meshgrid function to create the X and Y matrices.
To create a parametric grid, create a rectangular grid and pass it through a mathematical function.
But in its case of specifying Parametric Grid, X and Y don’t follow do not meet the above requirement, which is "A matrix that is increasing or decreasing along one dimension and is constant along the other dimension. Set the dimension that varies to the opposite of the dimension that varies in matrix Y."
I wonder if that means you can use X and Y coordinates for scatter points, for example:
X = [1 2 3; 2 3 4; 3 4 5]
Y = [1 1 1; 2 2 2; 3 3 3]
And the second one is:
In the documentation of contourf
x-coordinates, specified as a matrix the same size as Z, or as a vector with length n, where [m,n] = size(Z). The default value of X is the vector (1:n).
When X is a matrix, the values must be strictly increasing or decreasing along one dimension and remain constant along the other dimension. The dimension that varies must be the opposite of the dimension that varies in Y. You can use the meshgrid function to create X and Y matrices.
When X is a vector, the values must be strictly increasing or decreasing.
I wonder if that I can use X and Y coordinates for scatter points, for example:
X = [1 2 3; 2 3 4; 3 4 5]
Y = [1 1 1; 2 2 2; 3 3 3] I have two questions, the first one is:
In the documentation of pcolor
the input arguments X is described as follows:
x-coordinates, specified as a matrix the same size as C, or as a vector of length n, where [m,n] = size(C). The default value of X is the vector (1:n).
To create a rectangular grid of vertices, specify X as either of the following:
A vector containing values that are increasing or decreasing.
A matrix that is increasing or decreasing along one dimension and is constant along the other dimension. Set the dimension that varies to the opposite of the dimension that varies in matrix Y. You can use the meshgrid function to create the X and Y matrices.
To create a parametric grid, create a rectangular grid and pass it through a mathematical function.
But in its case of specifying Parametric Grid, X and Y don’t follow do not meet the above requirement, which is "A matrix that is increasing or decreasing along one dimension and is constant along the other dimension. Set the dimension that varies to the opposite of the dimension that varies in matrix Y."
I wonder if that means you can use X and Y coordinates for scatter points, for example:
X = [1 2 3; 2 3 4; 3 4 5]
Y = [1 1 1; 2 2 2; 3 3 3]
And the second one is:
In the documentation of contourf
x-coordinates, specified as a matrix the same size as Z, or as a vector with length n, where [m,n] = size(Z). The default value of X is the vector (1:n).
When X is a matrix, the values must be strictly increasing or decreasing along one dimension and remain constant along the other dimension. The dimension that varies must be the opposite of the dimension that varies in Y. You can use the meshgrid function to create X and Y matrices.
When X is a vector, the values must be strictly increasing or decreasing.
I wonder if that I can use X and Y coordinates for scatter points, for example:
X = [1 2 3; 2 3 4; 3 4 5]
Y = [1 1 1; 2 2 2; 3 3 3] pcolor, contour, countourf MATLAB Answers — New Questions
How to give MATLAB Web App Server access to a directory or a file on the server?
I have a web app that interacts with a local directory on the server machine. How do I give the Web App Server access to the directory?I have a web app that interacts with a local directory on the server machine. How do I give the Web App Server access to the directory? I have a web app that interacts with a local directory on the server machine. How do I give the Web App Server access to the directory? server, file, webapp MATLAB Answers — New Questions
Arduino MKR Motor Carrier Not Found
I’m trying to use the Arduino MKR 1000 with Motor Carrier and when I run
arduinosetup
and follow the prompts to set up my board, I get the following error log
Jun 03, 2023 12:02:42 PM com.mathworks.hwservices.logging
INFO: Loading configuration…
Initializing packages…
Preparing boards…
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Verifying…
C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1arduino-builder -dump-prefs -logger=machine -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardware -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1tools-builder -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardwaretoolsavr -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -built-in-libraries C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1libraries -libraries C:UsersmasteDocumentsArduinolibraries -fqbn=arduino:samd:mkr1000 -vid-pid=0X2341_0X804E -ide-version=10801 -build-path C:UsersmasteAppDataLocalTempArduinoServerMW -warnings=null -prefs=build.path=C:UsersmasteAppDataLocalTempArduinoServerMW -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.openocd.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsopenocd.9.0-arduino6-static -prefs=runtime.tools.arduinoOTA.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarduinoOTA1.2.0 -prefs=runtime.tools.CMSIS-Atmel.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0 -prefs=runtime.tools.bossac.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsbossac1.7.0 -prefs=runtime.tools.CMSIS.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1 -verbose C:UsersmasteAppDataLocalTempArduinoServerArduinoServer.ino
C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1arduino-builder -compile -logger=machine -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardware -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1tools-builder -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardwaretoolsavr -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -built-in-libraries C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1libraries -libraries C:UsersmasteDocumentsArduinolibraries -fqbn=arduino:samd:mkr1000 -vid-pid=0X2341_0X804E -ide-version=10801 -build-path C:UsersmasteAppDataLocalTempArduinoServerMW -warnings=null -prefs=build.path=C:UsersmasteAppDataLocalTempArduinoServerMW -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.openocd.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsopenocd.9.0-arduino6-static -prefs=runtime.tools.arduinoOTA.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarduinoOTA1.2.0 -prefs=runtime.tools.CMSIS-Atmel.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0 -prefs=runtime.tools.bossac.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsbossac1.7.0 -prefs=runtime.tools.CMSIS.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1 -verbose C:UsersmasteAppDataLocalTempArduinoServerArduinoServer.ino
Using board ‘mkr1000’ from platform in folder: C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20
Using core ‘arduino’ from platform in folder: C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20
Detecting libraries used…
"C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON ‘-DUSB_MANUFACTURER="Arduino LLC"’ ‘-DUSB_PRODUCT="Arduino MKR1000"’ "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0/CMSIS/Include/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0/CMSIS/Device/ATMEL/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20coresarduino" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20variantsmkr1000" "C:UsersmasteAppDataLocalTempArduinoServerMWsketchArduinoServer.ino.cpp" -o "nul"
"C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON ‘-DUSB_MANUFACTURER="Arduino LLC"’ ‘-DUSB_PRODUCT="Arduino MKR1000"’ "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0/CMSIS/Include/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0/CMSIS/Device/ATMEL/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20coresarduino" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20variantsmkr1000" "C:UsersmasteAppDataLocalTempArduinoServerMWsketchIO_addOn.cpp" -o "nul"
"C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON ‘-DUSB_MANUFACTURER="Arduino LLC"’ ‘-DUSB_PRODUCT="Arduino MKR1000"’ "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0/CMSIS/Include/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0/CMSIS/Device/ATMEL/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20coresarduino" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20variantsmkr1000" "C:UsersmasteAppDataLocalTempArduinoServerMWsketchIO_addOn.cpp" -o "C:UsersmasteAppDataLocalTempArduinoServerMWpreprocctags_target_for_gcc_minus_e.cpp"
In file included from C:UsersmasteAppDataLocalTempArduinoServerMWsketchaddOnLibraries.h:4:0,
from C:UsersmasteAppDataLocalTempArduinoServerMWsketchIO_addOn.cpp:12:
C:UsersmasteAppDataRoamingMathWorksMATLAB Add-OnsToolboxesAEK-Rev-1-Hardware-Support-19a+matlabMATLABAddon+arduinoioaddons+arduinosrcMKRMotorCarrierBase.h:11:29: fatal error: MKRMotorCarrier.h: No such file or directory
#include "MKRMotorCarrier.h"
^
compilation terminated.
exit status 1
I have already ran
edit ArduinoKitHardwareSupportReadMe.txt
and followed the directions. I can confirm that the correct Motor Carrier library is in place.
What could I need to do? Do I need to move MKRMotorCarrier.h somewhere?I’m trying to use the Arduino MKR 1000 with Motor Carrier and when I run
arduinosetup
and follow the prompts to set up my board, I get the following error log
Jun 03, 2023 12:02:42 PM com.mathworks.hwservices.logging
INFO: Loading configuration…
Initializing packages…
Preparing boards…
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Verifying…
C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1arduino-builder -dump-prefs -logger=machine -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardware -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1tools-builder -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardwaretoolsavr -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -built-in-libraries C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1libraries -libraries C:UsersmasteDocumentsArduinolibraries -fqbn=arduino:samd:mkr1000 -vid-pid=0X2341_0X804E -ide-version=10801 -build-path C:UsersmasteAppDataLocalTempArduinoServerMW -warnings=null -prefs=build.path=C:UsersmasteAppDataLocalTempArduinoServerMW -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.openocd.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsopenocd.9.0-arduino6-static -prefs=runtime.tools.arduinoOTA.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarduinoOTA1.2.0 -prefs=runtime.tools.CMSIS-Atmel.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0 -prefs=runtime.tools.bossac.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsbossac1.7.0 -prefs=runtime.tools.CMSIS.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1 -verbose C:UsersmasteAppDataLocalTempArduinoServerArduinoServer.ino
C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1arduino-builder -compile -logger=machine -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardware -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1tools-builder -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardwaretoolsavr -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -built-in-libraries C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1libraries -libraries C:UsersmasteDocumentsArduinolibraries -fqbn=arduino:samd:mkr1000 -vid-pid=0X2341_0X804E -ide-version=10801 -build-path C:UsersmasteAppDataLocalTempArduinoServerMW -warnings=null -prefs=build.path=C:UsersmasteAppDataLocalTempArduinoServerMW -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.openocd.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsopenocd.9.0-arduino6-static -prefs=runtime.tools.arduinoOTA.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarduinoOTA1.2.0 -prefs=runtime.tools.CMSIS-Atmel.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0 -prefs=runtime.tools.bossac.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsbossac1.7.0 -prefs=runtime.tools.CMSIS.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1 -verbose C:UsersmasteAppDataLocalTempArduinoServerArduinoServer.ino
Using board ‘mkr1000’ from platform in folder: C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20
Using core ‘arduino’ from platform in folder: C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20
Detecting libraries used…
"C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON ‘-DUSB_MANUFACTURER="Arduino LLC"’ ‘-DUSB_PRODUCT="Arduino MKR1000"’ "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0/CMSIS/Include/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0/CMSIS/Device/ATMEL/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20coresarduino" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20variantsmkr1000" "C:UsersmasteAppDataLocalTempArduinoServerMWsketchArduinoServer.ino.cpp" -o "nul"
"C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON ‘-DUSB_MANUFACTURER="Arduino LLC"’ ‘-DUSB_PRODUCT="Arduino MKR1000"’ "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0/CMSIS/Include/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0/CMSIS/Device/ATMEL/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20coresarduino" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20variantsmkr1000" "C:UsersmasteAppDataLocalTempArduinoServerMWsketchIO_addOn.cpp" -o "nul"
"C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON ‘-DUSB_MANUFACTURER="Arduino LLC"’ ‘-DUSB_PRODUCT="Arduino MKR1000"’ "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0/CMSIS/Include/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0/CMSIS/Device/ATMEL/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20coresarduino" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20variantsmkr1000" "C:UsersmasteAppDataLocalTempArduinoServerMWsketchIO_addOn.cpp" -o "C:UsersmasteAppDataLocalTempArduinoServerMWpreprocctags_target_for_gcc_minus_e.cpp"
In file included from C:UsersmasteAppDataLocalTempArduinoServerMWsketchaddOnLibraries.h:4:0,
from C:UsersmasteAppDataLocalTempArduinoServerMWsketchIO_addOn.cpp:12:
C:UsersmasteAppDataRoamingMathWorksMATLAB Add-OnsToolboxesAEK-Rev-1-Hardware-Support-19a+matlabMATLABAddon+arduinoioaddons+arduinosrcMKRMotorCarrierBase.h:11:29: fatal error: MKRMotorCarrier.h: No such file or directory
#include "MKRMotorCarrier.h"
^
compilation terminated.
exit status 1
I have already ran
edit ArduinoKitHardwareSupportReadMe.txt
and followed the directions. I can confirm that the correct Motor Carrier library is in place.
What could I need to do? Do I need to move MKRMotorCarrier.h somewhere? I’m trying to use the Arduino MKR 1000 with Motor Carrier and when I run
arduinosetup
and follow the prompts to set up my board, I get the following error log
Jun 03, 2023 12:02:42 PM com.mathworks.hwservices.logging
INFO: Loading configuration…
Initializing packages…
Preparing boards…
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Invalid library found in C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1: C:UsersmasteDocumentsArduinolibrariesMKRMotorCarrier-1.0.1
Verifying…
C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1arduino-builder -dump-prefs -logger=machine -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardware -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1tools-builder -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardwaretoolsavr -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -built-in-libraries C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1libraries -libraries C:UsersmasteDocumentsArduinolibraries -fqbn=arduino:samd:mkr1000 -vid-pid=0X2341_0X804E -ide-version=10801 -build-path C:UsersmasteAppDataLocalTempArduinoServerMW -warnings=null -prefs=build.path=C:UsersmasteAppDataLocalTempArduinoServerMW -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.openocd.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsopenocd.9.0-arduino6-static -prefs=runtime.tools.arduinoOTA.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarduinoOTA1.2.0 -prefs=runtime.tools.CMSIS-Atmel.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0 -prefs=runtime.tools.bossac.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsbossac1.7.0 -prefs=runtime.tools.CMSIS.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1 -verbose C:UsersmasteAppDataLocalTempArduinoServerArduinoServer.ino
C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1arduino-builder -compile -logger=machine -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardware -hardware C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1tools-builder -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1hardwaretoolsavr -tools C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackages -built-in-libraries C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetarduino-1.8.1libraries -libraries C:UsersmasteDocumentsArduinolibraries -fqbn=arduino:samd:mkr1000 -vid-pid=0X2341_0X804E -ide-version=10801 -build-path C:UsersmasteAppDataLocalTempArduinoServerMW -warnings=null -prefs=build.path=C:UsersmasteAppDataLocalTempArduinoServerMW -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.openocd.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsopenocd.9.0-arduino6-static -prefs=runtime.tools.arduinoOTA.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarduinoOTA1.2.0 -prefs=runtime.tools.CMSIS-Atmel.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0 -prefs=runtime.tools.bossac.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsbossac1.7.0 -prefs=runtime.tools.CMSIS.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1 -verbose C:UsersmasteAppDataLocalTempArduinoServerArduinoServer.ino
Using board ‘mkr1000’ from platform in folder: C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20
Using core ‘arduino’ from platform in folder: C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20
Detecting libraries used…
"C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON ‘-DUSB_MANUFACTURER="Arduino LLC"’ ‘-DUSB_PRODUCT="Arduino MKR1000"’ "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0/CMSIS/Include/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0/CMSIS/Device/ATMEL/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20coresarduino" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20variantsmkr1000" "C:UsersmasteAppDataLocalTempArduinoServerMWsketchArduinoServer.ino.cpp" -o "nul"
"C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON ‘-DUSB_MANUFACTURER="Arduino LLC"’ ‘-DUSB_PRODUCT="Arduino MKR1000"’ "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0/CMSIS/Include/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0/CMSIS/Device/ATMEL/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20coresarduino" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20variantsmkr1000" "C:UsersmasteAppDataLocalTempArduinoServerMWsketchIO_addOn.cpp" -o "nul"
"C:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsarm-none-eabi-gcc4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON ‘-DUSB_MANUFACTURER="Arduino LLC"’ ‘-DUSB_PRODUCT="Arduino MKR1000"’ "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS4.5.0/CMSIS/Include/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinotoolsCMSIS-Atmel1.1.0/CMSIS/Device/ATMEL/" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20coresarduino" "-IC:ProgramDataMATLABSupportPackagesR2019a3P.instrsetarduinoide.instrsetidepkgspackagesarduinohardwaresamd1.6.20variantsmkr1000" "C:UsersmasteAppDataLocalTempArduinoServerMWsketchIO_addOn.cpp" -o "C:UsersmasteAppDataLocalTempArduinoServerMWpreprocctags_target_for_gcc_minus_e.cpp"
In file included from C:UsersmasteAppDataLocalTempArduinoServerMWsketchaddOnLibraries.h:4:0,
from C:UsersmasteAppDataLocalTempArduinoServerMWsketchIO_addOn.cpp:12:
C:UsersmasteAppDataRoamingMathWorksMATLAB Add-OnsToolboxesAEK-Rev-1-Hardware-Support-19a+matlabMATLABAddon+arduinoioaddons+arduinosrcMKRMotorCarrierBase.h:11:29: fatal error: MKRMotorCarrier.h: No such file or directory
#include "MKRMotorCarrier.h"
^
compilation terminated.
exit status 1
I have already ran
edit ArduinoKitHardwareSupportReadMe.txt
and followed the directions. I can confirm that the correct Motor Carrier library is in place.
What could I need to do? Do I need to move MKRMotorCarrier.h somewhere? arduino MATLAB Answers — New Questions
How to detect change in mean value of a signal
Hello!!!
I would like to ask for some help.
I am working with inputing a large number of time-series signals. Among these signals, there are some signals which the mean value has changed. I would ignore reading the signals which there is a change in mean value. I will give three examples of signal: 1) normal (without changing mean), 2) abrupt changing in mean value, and 3) linear changing in mean value. My goal is to detect signals which there is a change in mean and skip reading these signals.
Ps., I would like to set criteria that if the magnitude of change in mean is larger than 10,000, it will treat as there is a change of mean value. Lastly, the files of these three examples of signal are also attached.
1) Normal (✅ would like to input to matlab)
2) Abupt change (❌ do not want to input to matlab)
3) Linear change (❌ do not want to input to matlab)Hello!!!
I would like to ask for some help.
I am working with inputing a large number of time-series signals. Among these signals, there are some signals which the mean value has changed. I would ignore reading the signals which there is a change in mean value. I will give three examples of signal: 1) normal (without changing mean), 2) abrupt changing in mean value, and 3) linear changing in mean value. My goal is to detect signals which there is a change in mean and skip reading these signals.
Ps., I would like to set criteria that if the magnitude of change in mean is larger than 10,000, it will treat as there is a change of mean value. Lastly, the files of these three examples of signal are also attached.
1) Normal (✅ would like to input to matlab)
2) Abupt change (❌ do not want to input to matlab)
3) Linear change (❌ do not want to input to matlab) Hello!!!
I would like to ask for some help.
I am working with inputing a large number of time-series signals. Among these signals, there are some signals which the mean value has changed. I would ignore reading the signals which there is a change in mean value. I will give three examples of signal: 1) normal (without changing mean), 2) abrupt changing in mean value, and 3) linear changing in mean value. My goal is to detect signals which there is a change in mean and skip reading these signals.
Ps., I would like to set criteria that if the magnitude of change in mean is larger than 10,000, it will treat as there is a change of mean value. Lastly, the files of these three examples of signal are also attached.
1) Normal (✅ would like to input to matlab)
2) Abupt change (❌ do not want to input to matlab)
3) Linear change (❌ do not want to input to matlab) matlab, signal processing MATLAB Answers — New Questions
Simulink Mask won’t display parameter values
I want my masked subsystem to display two parameter values, but for some reason it is only displaying the variable name. I am not sure what the problem is. Photos are attached.I want my masked subsystem to display two parameter values, but for some reason it is only displaying the variable name. I am not sure what the problem is. Photos are attached. I want my masked subsystem to display two parameter values, but for some reason it is only displaying the variable name. I am not sure what the problem is. Photos are attached. simulink, mask, subsystem MATLAB Answers — New Questions
u003cu0068u0031u003eHow to use Thi”ngSpeak””
lsls ls u003cu0068u0031u003e<h1><h1>%3ch1%3ehwkki%22 MATLAB Answers — New Questions
Import color video as grayscale?
Hi,
I am using the image processing toolbox and wonder if there is a smarter way to import color video as grayscale rather than looping over the color frames with the RGB2GRAY function (see below).
colorVidFrames = read(videoObj, [startFrame endFrame]);
for f = startFrame:endFrame
J = rgb2gray(colorVidFrames(:,:,:,f)); % CONVERT COLOR TO GRAY
gFrames(:,f) = J(:); % GRAY FRAMES
end
clear colorVidFrames
While the RGB2GRAY loop method does provide the desired end result, it is quite computationally expensive for my application. I understand that the computational rigor could be alleviated via parallel computing, but I’m really looking to avoid the conversion loop altogether if possible.
Thanks,
-JeffHi,
I am using the image processing toolbox and wonder if there is a smarter way to import color video as grayscale rather than looping over the color frames with the RGB2GRAY function (see below).
colorVidFrames = read(videoObj, [startFrame endFrame]);
for f = startFrame:endFrame
J = rgb2gray(colorVidFrames(:,:,:,f)); % CONVERT COLOR TO GRAY
gFrames(:,f) = J(:); % GRAY FRAMES
end
clear colorVidFrames
While the RGB2GRAY loop method does provide the desired end result, it is quite computationally expensive for my application. I understand that the computational rigor could be alleviated via parallel computing, but I’m really looking to avoid the conversion loop altogether if possible.
Thanks,
-Jeff Hi,
I am using the image processing toolbox and wonder if there is a smarter way to import color video as grayscale rather than looping over the color frames with the RGB2GRAY function (see below).
colorVidFrames = read(videoObj, [startFrame endFrame]);
for f = startFrame:endFrame
J = rgb2gray(colorVidFrames(:,:,:,f)); % CONVERT COLOR TO GRAY
gFrames(:,f) = J(:); % GRAY FRAMES
end
clear colorVidFrames
While the RGB2GRAY loop method does provide the desired end result, it is quite computationally expensive for my application. I understand that the computational rigor could be alleviated via parallel computing, but I’m really looking to avoid the conversion loop altogether if possible.
Thanks,
-Jeff rgb2gray import video read videoreader color grayscale MATLAB Answers — New Questions
Is there a way to crop an array depending on the values that I want through a function as the values change?
I currently have a graph that has multiple flat maxima but I only want the index values of the last one. I am currently using islocalmax(data,’flatselection’,’all’) to get all of the local maxima that exist and that then gives me a logical array which I can then either get the index values of all the 1’s but I then want the last collection of 1’s or the last collection of consecutive indexes. I was just wondering if there was a way to specifically select these values? I could manually find the start point of the last set and then set it to the end but as I want to use it on multiple data sets I want it to be automatic.
peaks = islocalmax(test.CAN_EMTrq,’FlatSelection’,’all’);
peaks1 = find(peaks==1);
This is the code I am using right now.
The table either looks like: 000011111000100001111101111 and I want the last 4 1’s or it looks like: 12,13,14,15,34,35,36,37,38,56,57,58,59 and I want the last 4 numbers.
ThanksI currently have a graph that has multiple flat maxima but I only want the index values of the last one. I am currently using islocalmax(data,’flatselection’,’all’) to get all of the local maxima that exist and that then gives me a logical array which I can then either get the index values of all the 1’s but I then want the last collection of 1’s or the last collection of consecutive indexes. I was just wondering if there was a way to specifically select these values? I could manually find the start point of the last set and then set it to the end but as I want to use it on multiple data sets I want it to be automatic.
peaks = islocalmax(test.CAN_EMTrq,’FlatSelection’,’all’);
peaks1 = find(peaks==1);
This is the code I am using right now.
The table either looks like: 000011111000100001111101111 and I want the last 4 1’s or it looks like: 12,13,14,15,34,35,36,37,38,56,57,58,59 and I want the last 4 numbers.
Thanks I currently have a graph that has multiple flat maxima but I only want the index values of the last one. I am currently using islocalmax(data,’flatselection’,’all’) to get all of the local maxima that exist and that then gives me a logical array which I can then either get the index values of all the 1’s but I then want the last collection of 1’s or the last collection of consecutive indexes. I was just wondering if there was a way to specifically select these values? I could manually find the start point of the last set and then set it to the end but as I want to use it on multiple data sets I want it to be automatic.
peaks = islocalmax(test.CAN_EMTrq,’FlatSelection’,’all’);
peaks1 = find(peaks==1);
This is the code I am using right now.
The table either looks like: 000011111000100001111101111 and I want the last 4 1’s or it looks like: 12,13,14,15,34,35,36,37,38,56,57,58,59 and I want the last 4 numbers.
Thanks matlab, data MATLAB Answers — New Questions
MATLAB wont start on Linux. It did yesterday.
I use MATLAB on Linux every day. It wouldn’t start this morning, reporting a memory problem. I rebooted which didn’t fix anything. I then updated to R2024a (I was on R2023b) and still it wont start. Here’s what I see when I run it from the command line:
$ matlab
MATLAB is selecting SOFTWARE rendering.
library initialization failed – unable to allocate file descriptor table – out of memory
MATLAB is exiting because of fatal error
Killed
$ free -m
total used free shared buff/cache available
Mem: 31531 4149 23394 32 4490 27381
Swap: 975 0 975
$ uname -a
Linux opsproc3 6.6.13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.6.13-1 (2024-01-20) x86_64 GNU/Linux
Any suggestions as to what the problem might be? I didn’t make any changes to my computer.I use MATLAB on Linux every day. It wouldn’t start this morning, reporting a memory problem. I rebooted which didn’t fix anything. I then updated to R2024a (I was on R2023b) and still it wont start. Here’s what I see when I run it from the command line:
$ matlab
MATLAB is selecting SOFTWARE rendering.
library initialization failed – unable to allocate file descriptor table – out of memory
MATLAB is exiting because of fatal error
Killed
$ free -m
total used free shared buff/cache available
Mem: 31531 4149 23394 32 4490 27381
Swap: 975 0 975
$ uname -a
Linux opsproc3 6.6.13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.6.13-1 (2024-01-20) x86_64 GNU/Linux
Any suggestions as to what the problem might be? I didn’t make any changes to my computer. I use MATLAB on Linux every day. It wouldn’t start this morning, reporting a memory problem. I rebooted which didn’t fix anything. I then updated to R2024a (I was on R2023b) and still it wont start. Here’s what I see when I run it from the command line:
$ matlab
MATLAB is selecting SOFTWARE rendering.
library initialization failed – unable to allocate file descriptor table – out of memory
MATLAB is exiting because of fatal error
Killed
$ free -m
total used free shared buff/cache available
Mem: 31531 4149 23394 32 4490 27381
Swap: 975 0 975
$ uname -a
Linux opsproc3 6.6.13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.6.13-1 (2024-01-20) x86_64 GNU/Linux
Any suggestions as to what the problem might be? I didn’t make any changes to my computer. linux, memory MATLAB Answers — New Questions
calculate predictions with weights and bias which extracted from LSTM model
Hello,
I’am trying to calculate outputs using parameters from LSTM model (recurrentweight, inputweight, bias)
but output is different between "below codes" and "output from code Y=predict(net,X)".
please help me if you know the problems.
Thank you.
My network structure: (simple network)
layers = [
sequenceInputLayer(9,"Normalization","none") % number of input parameters are 9
lstmLayer(256)
fullyConnectedLayer(1)];
options = trainingOptions("adam", …
MaxEpochs=2000, …
SequencePaddingDirection="left", …
Shuffle="every-epoch", …
Plots="training-progress", …
Verbose=false);
net = trainnet(X,Y,layers,"mse",options);
My code to extract the weights and bias:
R=net.Layers(2,1).RecurrentWeights;
W=net.Layers(2,1).InputWeights;
b=net.Layers(2,1).Bias;
Fc_W=net.Layers(3,1).Weights;
Fc_B=net.Layers(3,1).Bias;
Code for extract parameters of LSTM Layer (input, forget, cell, output)
HiddenLayersNum = 256;
W.Wi=W(1:HiddenLayersNum,:);
W.Wf=W(HiddenLayersNum+1:2*HiddenLayersNum,:);
W.Wc=W(2*HiddenLayersNum+1:3*HiddenLayersNum,:);
W.Wo=W(3*HiddenLayersNum+1:4*HiddenLayersNum,:);
R.Ri=R(1:HiddenLayersNum,:);
R.Rf=R(HiddenLayersNum+1:2*HiddenLayersNum,:);
R.Rc=R(2*HiddenLayersNum+1:3*HiddenLayersNum,:);
R.Ro=R(3*HiddenLayersNum+1:4*HiddenLayersNum,:);
B.bi=b(1,:);
B.bf=b(HiddenLayersNum+1:2*HiddenLayersNum,:);
B.bc=b(2*HiddenLayersNum+1:3*HiddenLayersNum,:);
B.bo=b(3*HiddenLayersNum+1:4*HiddenLayersNum,:);
h=net.State.Value{1,1}; % Hiddenstate
c=net.State.Value{2,1}; % Cellstate
Code for calculate LSTM Layer output:
% Input Gate
Z = W.Wi*X+R.Ri*h+B.bi; % x is new intput value for prediction (ex: x=[1 5 20 1 2];)
I = 1.0 ./ (1.0 + exp(-Z)); % Input gate
% Forget Gate
f =W.Wf*X+R.Rf*h+B.bf;
F = 1.0 ./ (1.0 + exp(-f)); % Forget gate
% Layer Input
g=W.Wc*X+R.Rc*h+B.bc; % Layer input
G=tanh(g);
% Output Layer
output = W.Wo*X+R.Ro*h_prev+B.bo;
output = 1.0 ./ (1.0 + exp(-output)); % Output Gate
% Cell State
cellgate=F.*c+I.*G; % Cell Gate
cellgate=cellgate;
% Output (Hidden) State
hidden=O.*tanh(cellgate); % Output State
hidden=dlarray(hidden);
L1 = relu(hidden);
Code for calculate output in fullyconnected Layer:
Fc=Fc_W*L1+Fc_BHello,
I’am trying to calculate outputs using parameters from LSTM model (recurrentweight, inputweight, bias)
but output is different between "below codes" and "output from code Y=predict(net,X)".
please help me if you know the problems.
Thank you.
My network structure: (simple network)
layers = [
sequenceInputLayer(9,"Normalization","none") % number of input parameters are 9
lstmLayer(256)
fullyConnectedLayer(1)];
options = trainingOptions("adam", …
MaxEpochs=2000, …
SequencePaddingDirection="left", …
Shuffle="every-epoch", …
Plots="training-progress", …
Verbose=false);
net = trainnet(X,Y,layers,"mse",options);
My code to extract the weights and bias:
R=net.Layers(2,1).RecurrentWeights;
W=net.Layers(2,1).InputWeights;
b=net.Layers(2,1).Bias;
Fc_W=net.Layers(3,1).Weights;
Fc_B=net.Layers(3,1).Bias;
Code for extract parameters of LSTM Layer (input, forget, cell, output)
HiddenLayersNum = 256;
W.Wi=W(1:HiddenLayersNum,:);
W.Wf=W(HiddenLayersNum+1:2*HiddenLayersNum,:);
W.Wc=W(2*HiddenLayersNum+1:3*HiddenLayersNum,:);
W.Wo=W(3*HiddenLayersNum+1:4*HiddenLayersNum,:);
R.Ri=R(1:HiddenLayersNum,:);
R.Rf=R(HiddenLayersNum+1:2*HiddenLayersNum,:);
R.Rc=R(2*HiddenLayersNum+1:3*HiddenLayersNum,:);
R.Ro=R(3*HiddenLayersNum+1:4*HiddenLayersNum,:);
B.bi=b(1,:);
B.bf=b(HiddenLayersNum+1:2*HiddenLayersNum,:);
B.bc=b(2*HiddenLayersNum+1:3*HiddenLayersNum,:);
B.bo=b(3*HiddenLayersNum+1:4*HiddenLayersNum,:);
h=net.State.Value{1,1}; % Hiddenstate
c=net.State.Value{2,1}; % Cellstate
Code for calculate LSTM Layer output:
% Input Gate
Z = W.Wi*X+R.Ri*h+B.bi; % x is new intput value for prediction (ex: x=[1 5 20 1 2];)
I = 1.0 ./ (1.0 + exp(-Z)); % Input gate
% Forget Gate
f =W.Wf*X+R.Rf*h+B.bf;
F = 1.0 ./ (1.0 + exp(-f)); % Forget gate
% Layer Input
g=W.Wc*X+R.Rc*h+B.bc; % Layer input
G=tanh(g);
% Output Layer
output = W.Wo*X+R.Ro*h_prev+B.bo;
output = 1.0 ./ (1.0 + exp(-output)); % Output Gate
% Cell State
cellgate=F.*c+I.*G; % Cell Gate
cellgate=cellgate;
% Output (Hidden) State
hidden=O.*tanh(cellgate); % Output State
hidden=dlarray(hidden);
L1 = relu(hidden);
Code for calculate output in fullyconnected Layer:
Fc=Fc_W*L1+Fc_B Hello,
I’am trying to calculate outputs using parameters from LSTM model (recurrentweight, inputweight, bias)
but output is different between "below codes" and "output from code Y=predict(net,X)".
please help me if you know the problems.
Thank you.
My network structure: (simple network)
layers = [
sequenceInputLayer(9,"Normalization","none") % number of input parameters are 9
lstmLayer(256)
fullyConnectedLayer(1)];
options = trainingOptions("adam", …
MaxEpochs=2000, …
SequencePaddingDirection="left", …
Shuffle="every-epoch", …
Plots="training-progress", …
Verbose=false);
net = trainnet(X,Y,layers,"mse",options);
My code to extract the weights and bias:
R=net.Layers(2,1).RecurrentWeights;
W=net.Layers(2,1).InputWeights;
b=net.Layers(2,1).Bias;
Fc_W=net.Layers(3,1).Weights;
Fc_B=net.Layers(3,1).Bias;
Code for extract parameters of LSTM Layer (input, forget, cell, output)
HiddenLayersNum = 256;
W.Wi=W(1:HiddenLayersNum,:);
W.Wf=W(HiddenLayersNum+1:2*HiddenLayersNum,:);
W.Wc=W(2*HiddenLayersNum+1:3*HiddenLayersNum,:);
W.Wo=W(3*HiddenLayersNum+1:4*HiddenLayersNum,:);
R.Ri=R(1:HiddenLayersNum,:);
R.Rf=R(HiddenLayersNum+1:2*HiddenLayersNum,:);
R.Rc=R(2*HiddenLayersNum+1:3*HiddenLayersNum,:);
R.Ro=R(3*HiddenLayersNum+1:4*HiddenLayersNum,:);
B.bi=b(1,:);
B.bf=b(HiddenLayersNum+1:2*HiddenLayersNum,:);
B.bc=b(2*HiddenLayersNum+1:3*HiddenLayersNum,:);
B.bo=b(3*HiddenLayersNum+1:4*HiddenLayersNum,:);
h=net.State.Value{1,1}; % Hiddenstate
c=net.State.Value{2,1}; % Cellstate
Code for calculate LSTM Layer output:
% Input Gate
Z = W.Wi*X+R.Ri*h+B.bi; % x is new intput value for prediction (ex: x=[1 5 20 1 2];)
I = 1.0 ./ (1.0 + exp(-Z)); % Input gate
% Forget Gate
f =W.Wf*X+R.Rf*h+B.bf;
F = 1.0 ./ (1.0 + exp(-f)); % Forget gate
% Layer Input
g=W.Wc*X+R.Rc*h+B.bc; % Layer input
G=tanh(g);
% Output Layer
output = W.Wo*X+R.Ro*h_prev+B.bo;
output = 1.0 ./ (1.0 + exp(-output)); % Output Gate
% Cell State
cellgate=F.*c+I.*G; % Cell Gate
cellgate=cellgate;
% Output (Hidden) State
hidden=O.*tanh(cellgate); % Output State
hidden=dlarray(hidden);
L1 = relu(hidden);
Code for calculate output in fullyconnected Layer:
Fc=Fc_W*L1+Fc_B lstm, weight, interpret, deep learning MATLAB Answers — New Questions
How to remove repeating elements but maintain occurrences in an array?
Is there a way that I can get the first occurrence of consecutively repeating values, even if the same value occurs at few different places in the matrix?
Say I have a matrix
X=[2 2 2 2 -1 -1 -1 6 6 6 6 6 5 5 5 2 2 2 2 7 7 6 6]
I want the result to be
ans=[2 -1 6 5 2 7 6].
I’ve checked a similar question <http://www.mathworks.com/matlabcentral/answers/16667-how-to-remove-repeating-elements-from-an-array How to remove repeating elements from an array> but using unique and keeping the same order as original matrix gives
ans=[2 -1 6 5 7].
I know I can use a loop like below. But I was wondering if there’s a function for this.
for i=1:(length(X)-1)
if (X(i+1,6)-X(i,6))~=0
ans(i,1)=X(i+1,6);
else
ans(i,1)=NaN;
end
end
A function to do this will be great.Is there a way that I can get the first occurrence of consecutively repeating values, even if the same value occurs at few different places in the matrix?
Say I have a matrix
X=[2 2 2 2 -1 -1 -1 6 6 6 6 6 5 5 5 2 2 2 2 7 7 6 6]
I want the result to be
ans=[2 -1 6 5 2 7 6].
I’ve checked a similar question <http://www.mathworks.com/matlabcentral/answers/16667-how-to-remove-repeating-elements-from-an-array How to remove repeating elements from an array> but using unique and keeping the same order as original matrix gives
ans=[2 -1 6 5 7].
I know I can use a loop like below. But I was wondering if there’s a function for this.
for i=1:(length(X)-1)
if (X(i+1,6)-X(i,6))~=0
ans(i,1)=X(i+1,6);
else
ans(i,1)=NaN;
end
end
A function to do this will be great. Is there a way that I can get the first occurrence of consecutively repeating values, even if the same value occurs at few different places in the matrix?
Say I have a matrix
X=[2 2 2 2 -1 -1 -1 6 6 6 6 6 5 5 5 2 2 2 2 7 7 6 6]
I want the result to be
ans=[2 -1 6 5 2 7 6].
I’ve checked a similar question <http://www.mathworks.com/matlabcentral/answers/16667-how-to-remove-repeating-elements-from-an-array How to remove repeating elements from an array> but using unique and keeping the same order as original matrix gives
ans=[2 -1 6 5 7].
I know I can use a loop like below. But I was wondering if there’s a function for this.
for i=1:(length(X)-1)
if (X(i+1,6)-X(i,6))~=0
ans(i,1)=X(i+1,6);
else
ans(i,1)=NaN;
end
end
A function to do this will be great. array, repeating elements, unique, sort, matrix, matrix manipulation MATLAB Answers — New Questions
Why i am getting the wrong graph values Active and Non Active even in code even i used the if statment to check whether Kf_LMaxA, KfL_LMax and Cand D is constant or not
Greeting
Why i am getting the wrong graph Active and Non Active Receptor values when i put Kf_LMaxA,B;C;D = 0.01 even in code i used the if statment to check whether Kf_LMaxA, KfL_LMax and Cand D is constant or not . Kindly check and guide me where i am wrong. I attach the Source code and MATLAB GUI (Interface) and the screen shot.Greeting
Why i am getting the wrong graph Active and Non Active Receptor values when i put Kf_LMaxA,B;C;D = 0.01 even in code i used the if statment to check whether Kf_LMaxA, KfL_LMax and Cand D is constant or not . Kindly check and guide me where i am wrong. I attach the Source code and MATLAB GUI (Interface) and the screen shot. Greeting
Why i am getting the wrong graph Active and Non Active Receptor values when i put Kf_LMaxA,B;C;D = 0.01 even in code i used the if statment to check whether Kf_LMaxA, KfL_LMax and Cand D is constant or not . Kindly check and guide me where i am wrong. I attach the Source code and MATLAB GUI (Interface) and the screen shot. matlab coder MATLAB Answers — New Questions
extracting area of cracks from image
Dear all, I wrote this code to extract cracks from a tomography image. I tried many ways to remove the background and enhance the colors for better crack extraction, but some cracks are still missing. Can anyone help me improve the code?
clear all
close all
clc
A= imread(‘image_1567.png’);
[rows, columns, numberOfColorChannels] = size(A);
[centers,radii] = imfindcircles(A,[500 650],Sensitivity=0.95);
mask = circles2mask(centers,radii,size(A));
new_image = A;
new_image(~mask) = nan;
figure(1)
sigma = 20;
Iflatfield = imflatfield(new_image,sigma);
imshow(Iflatfield)
figure(2)
imhist(Iflatfield);
figure(3)
crackMask = Iflatfield < 50;
imshow(crackMask)Dear all, I wrote this code to extract cracks from a tomography image. I tried many ways to remove the background and enhance the colors for better crack extraction, but some cracks are still missing. Can anyone help me improve the code?
clear all
close all
clc
A= imread(‘image_1567.png’);
[rows, columns, numberOfColorChannels] = size(A);
[centers,radii] = imfindcircles(A,[500 650],Sensitivity=0.95);
mask = circles2mask(centers,radii,size(A));
new_image = A;
new_image(~mask) = nan;
figure(1)
sigma = 20;
Iflatfield = imflatfield(new_image,sigma);
imshow(Iflatfield)
figure(2)
imhist(Iflatfield);
figure(3)
crackMask = Iflatfield < 50;
imshow(crackMask) Dear all, I wrote this code to extract cracks from a tomography image. I tried many ways to remove the background and enhance the colors for better crack extraction, but some cracks are still missing. Can anyone help me improve the code?
clear all
close all
clc
A= imread(‘image_1567.png’);
[rows, columns, numberOfColorChannels] = size(A);
[centers,radii] = imfindcircles(A,[500 650],Sensitivity=0.95);
mask = circles2mask(centers,radii,size(A));
new_image = A;
new_image(~mask) = nan;
figure(1)
sigma = 20;
Iflatfield = imflatfield(new_image,sigma);
imshow(Iflatfield)
figure(2)
imhist(Iflatfield);
figure(3)
crackMask = Iflatfield < 50;
imshow(crackMask) image analysis, crack identification, iflatfield MATLAB Answers — New Questions
How can I isolate some objects from a image?
(hot_air_balloons.jpg)
(canyon.jpg)
I try to isolate the 4 yellow hot air balloons from the image to paste them to canyon.jpg (second image). I aim to obtain a binary image that the pixesls of hot air ballons white and all other areas black to be able to isolate them from rest of the image. Could you help me to obtain that binary image?(hot_air_balloons.jpg)
(canyon.jpg)
I try to isolate the 4 yellow hot air balloons from the image to paste them to canyon.jpg (second image). I aim to obtain a binary image that the pixesls of hot air ballons white and all other areas black to be able to isolate them from rest of the image. Could you help me to obtain that binary image? (hot_air_balloons.jpg)
(canyon.jpg)
I try to isolate the 4 yellow hot air balloons from the image to paste them to canyon.jpg (second image). I aim to obtain a binary image that the pixesls of hot air ballons white and all other areas black to be able to isolate them from rest of the image. Could you help me to obtain that binary image? binary, image, image processing MATLAB Answers — New Questions
Termination criterion for Genetic Algorithm when used in context of feature selection??
I have tried for 50 iterations but on running the Matlab code the best fitness value of all iterations is coming out to be different at different times. How will I decide which will be the best features in such a condition.
Getting different best feature set for same number of iterations. How results should be interpreted so that I can come to a Termination criterion??I have tried for 50 iterations but on running the Matlab code the best fitness value of all iterations is coming out to be different at different times. How will I decide which will be the best features in such a condition.
Getting different best feature set for same number of iterations. How results should be interpreted so that I can come to a Termination criterion?? I have tried for 50 iterations but on running the Matlab code the best fitness value of all iterations is coming out to be different at different times. How will I decide which will be the best features in such a condition.
Getting different best feature set for same number of iterations. How results should be interpreted so that I can come to a Termination criterion?? genetic algorithm MATLAB Answers — New Questions