Community Profile

photo

Benjamin Thompson


Last seen: Today Active since 2015

Programming Languages:
C++, C, MATLAB
Spoken Languages:
English

Statistics

  • 6 Month Streak
  • Revival Level 2
  • Knowledgeable Level 4
  • First Answer

View badges

Content Feed

View by

Answered
MATLAB Coder does not recognize dot notation in struct member assignment
See the article "Name the C Structure Type to Use With a Global Structure Variable" in the MATLAB help documentation. You need ...

etwa 15 Stunden ago | 0

Answered
Implicit casting overhead from real to complex when multiplying two matrices
Multiplying a complex matrix by a real matrix requires fewer calculations so should take less time. Your test is a little too s...

etwa 15 Stunden ago | 0

Answered
How to change the max pixel value of the image
This is to increase the values of specific values in a matrix. You can probably take it from there: >> >> A = [35 40 45 55...

etwa 15 Stunden ago | 0

Answered
FFT of a Superposition signal
Try this, and see this article on usage of the FFT to understand how to interpret the results and assign results to frequencies....

etwa 16 Stunden ago | 0

Answered
enhance image quality for read Barcode
If your camera has autofocus, the reflection off the table below may be confusing it. Place something nonreflective with no hig...

8 Tage ago | 0

Answered
enhance image quality for read Barcode
Can you get a better photo? Can you read the barcode manually from this photo? You can use improfile to get something like thi...

11 Tage ago | 0

| accepted

Answered
How can I convert a file format FIG to PCD?
There is a function called pcwrite. The MATLAB documentation has a good article on it.

11 Tage ago | 0

Answered
Finding an element in table without using if_else condition
You can do some operations on the Table variables to get index vectors: >> Table_A.A ans = 3×1 string array "...

11 Tage ago | 1

| accepted

Answered
How to call c2000 library functions with the S-Function builder?
If you are using mex to compile this C code into a binary for Simulink to use as an S-Function block, you probably need to use t...

14 Tage ago | 0

Answered
Customized Library version management
Simulink libraries just have one version number for the whole thing just like Simulink model files. You can not version each bl...

29 Tage ago | 1

| accepted

Answered
[SOLVED ALREADY] Loop through data struct with variable names
You want to index into the structure array, then pass one of those array elements to the length function: >> S1.E1 = [1 1]; ...

29 Tage ago | 0

Answered
Using Matlab to open a text file
Looks like subl is not in your search path. You can use the system command to print out the search path that the MATLAB process...

29 Tage ago | 0

| accepted

Answered
Embedded coder 'Generate code only' not including toolbox files
If you have some other toolchain to compile the source code, you can locate the file in the MATLAB program files folder and incl...

30 Tage ago | 0

Answered
Getting NaN while using the ratio of power and factorial
The factorial function output increases very fast as input increases. See "doc factorial" for details. The output is "inf" for...

30 Tage ago | 0

Answered
How do I grab all the files with a certain name pattern from several folders?
The dir function will work with wildcard characters: D = dir(fullfile(myFolder, '*grab*'))

etwa ein Monat ago | 0

Answered
Image correction based on the mesh of projection surface
The image processing toolbox has only more basic geometric transformations, and computer vision has some camera calibration tool...

etwa ein Monat ago | 0

Answered
Video background removal in MATLAB by K-means clustering processing technique
I am not sure if it uses K-means clustering but vision.ForegroundDetector can support that type of application: https://www.m...

etwa ein Monat ago | 0

Answered
Why does my code bug down during while loop?
Have you tried the Profiler tool with your code? This can quickly highlite which parts take the most time. In this case line 2...

etwa ein Monat ago | 0

Answered
How to make matlab access two folders for data when separated by date
You can get file dates using the "dir" function or keyword in MATLAB. Does any of this help? >> D = dir D = 105×1 s...

etwa ein Monat ago | 0

Answered
Getting ginput to read axes on an appdesigner GUI
Here is a previous discussion on this topic: https://www.mathworks.com/matlabcentral/answers/392617-how-can-i-use-ginput-in-a...

etwa ein Monat ago | 0

| accepted

Answered
How do you use parameters with simulink coder?
You can change the parameter configuration using the Model Parameter Configuration dialog like below. But note that code from S...

etwa ein Monat ago | 0

Answered
Does Simulink Free Trial Version R2022a include Simulink coder and Embedded coder?
No you will need to request trials for those products separately.

etwa ein Monat ago | 0

Answered
Data Type Conversion in simulink
Type "doc fixedt" in MATLAB to get a detailed explanation of the fixed point data types. If I right click on the data type conv...

etwa ein Monat ago | 0

Answered
How to do +,-,*,/ with one scalar and one matrix(IN GUI)?
Addition and subtraction are the same. You can add or subtract a scalar from a matrix. Adding or subtracting matrices requires...

etwa ein Monat ago | 0

Answered
extracting road from lidar
Hard to tell without sample images but if the road is consistently a big black thing, use imclose to help make the edges solid a...

etwa 2 Monate ago | 0

Answered
Divide Image into Overlapping blocks and save it
An image is just a matrix. If you want to save a part, then imwrite(img(1:2084,1:1042), 'file1.jpg', 'jpg'); imwrite(img(1042...

etwa 2 Monate ago | 0

Answered
Detect ColorChecker chart in an image
You could pass a different value for Sensivity to colorChecker. By default it is 0.6. For information on supported color space...

etwa 2 Monate ago | 0

Answered
Parameter Estimation in Simulink
You could look over this example: https://www.mathworks.com/support/search.html/videos/online-parameter-estimation-with-simul...

etwa 2 Monate ago | 0

| accepted

Answered
How do I get the matrix of gray levels from the "from Video Device" in Simulink
Double click on the block and change the output color space option to "grayscale" if you can. Or, the Computer Vision Toolbox o...

etwa 2 Monate ago | 0

Answered
uigetfile in appdesigner freezes MATLAB
uigetfile is supposed to open a file selection dialog box and let the user select a file? Do you not see that dialog box pop up...

etwa 2 Monate ago | 0

Load more