Community Profile

photo

Benjamin Thompson


Last seen: 4 days ago 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
Get the displacement component which is perpendicular to the triangle (finite element)
d1 = [0.000131475 -0.000706995 0.000754736] You can make one of the vectors the origin by subtracting it from the other two, t...

6 days ago | 1

| accepted

Answered
Parameter and constant management for embedded coder
You should look over the examples included for Embedded Coder. There are some dealing with tunable parameters. Usually you nee...

6 days ago | 0

Answered
Could somebody help me to implement an algorithm with stateflow?
Please start with the Stateflow Onramp Training on the Mathworks website. Then try to implement your algorithm and if you have ...

13 days ago | 0

Answered
hermetic compressor simulation using simulink
You can start with the Simulink Onramp training on the Mathworks website. Then attempt to apply what you have learned to the pr...

13 days ago | 0

Answered
Problem in Signal Processing in MATLAB Course
What licenses do you have? The task seems to be trying to find Coder products which are not commonly used in student classes. ...

13 days ago | 0

| accepted

Answered
looping in all audio files
dir('*.wav') will return a struct containing all the audio file names. Then you can pass the name field of each element of that...

2 months ago | 0

Answered
Is it possible to inline Code Gen of top level Simulink model containing model references?
For generating C or C++ code using Embedded Coder, if you right click on the subsystem block, go to Block Parameters, and go to ...

2 months ago | 0

Answered
alignment of images - is there no function to align control points?
Your control points do not match up, and the last control point actually does not appear in the distorted image.

2 months ago | 0

| accepted

Answered
Wind gust modeling on Simulink...
The Aerospace Blockset has a variety of blocks for wind modeling, and discrete wind gusts per the MIL-F-8785C specification is o...

2 months ago | 0

Answered
How do I extract fixed-width columns from a file that includes empty spaces?
Use the import data tool and configure the delimiter options to use space and treat multiple delimiters as one. You can generat...

2 months ago | 0

Answered
Convert Video to lower quality file
You use VideoWriter to write out to an output video, like in this example: https://www.mathworks.com/help/matlab/import_export/...

2 months ago | 0

Answered
Simulink bus object modification from Matlab script
This article explains some ways of modifying the model workspace. If you have more specific questions please ask them and post ...

2 months ago | 0

Answered
How do i read a line after a word in a csv file
This could be a good example of using splitapply after reading in the entire dataset as a table. See this article: https://w...

2 months ago | 0

| accepted

Answered
Number of peaks in the interval
Use MinPeakHeight as the parameter name for findpeaks. You do not show the definition of locsI or psk in your sample code.

2 months ago | 0

Answered
Code generator does not create appropriate .h files for Simulink model
Could the output or example folder be read only?

2 months ago | 0

Answered
How to calculate the total length of all the lines in this image (with grid)?
You can use colorThresholder to help isolate the red pixels and then simply count all of them in the resulting mask image using ...

2 months ago | 0

Answered
Live webcam with histogram ?
Have you tried this example for acquiring an image: https://www.mathworks.com/help/supportpkg/usbwebcams/ug/acquiring-a-singl...

2 months ago | 0

| accepted

Answered
Fourier series fit to a periodic function with multiple frequencies
Try looking over the documentation of the fft in MATLAB, along with the examples included there. If you have more specific ques...

2 months ago | 0

Answered
Video Writer for cycle detection
You can use frame2im(getframe(gcf)) to get an image that has the result of imshow and viscircles together.

2 months ago | 0

| accepted

Answered
Parallel for loop problem
You may want to review this thread and use parfeval if the partial results option is something you want. https://www.mathwork...

2 months ago | 0

Answered
Risk Matrix in MATlab
This is getting pretty close: %Define risk matrix 1-3 (1 low - 2 medium - 3 severe) C=[2 3 3 3 3 3; 2 2 3 3 3 3; 1...

2 months ago | 1

| accepted

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 ...

2 months 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...

2 months ago | 0

| accepted

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...

2 months 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....

2 months 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...

2 months 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...

2 months 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.

2 months ago | 0

| accepted

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 "...

2 months 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...

2 months ago | 0

Load more