Go Premium for a chance to win a PS4. Enter to Win

x

MATLAB Programming

374

Solutions

444

Contributors

MATLAB is a numerical computing environment and proprietary fourth-generation programming language. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, Fortran and Python. Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and model-based design for dynamic and embedded systems.

Share tech news, updates, or what's on your mind.

Sign up to Post

HI

I have angles of head movements for each video frame in radians ,where positive values yaw correspond to head turning right and

negative values corresponds to head turning to the left .

 I need to calculate movement dynamics ( angular displacement , angular velocity ,angular acceleration )
yaw.csv
untitled.jpg
0
[Webinar] Cloud and Mobile-First Strategy
LVL 11
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

(i) Develop an algorithm to determine whether a graph represented by a node-node incidence matrix is connected or not. Provide a clear algorithm statement.
(ii) Code your algorithm in any programming language you prefer, run your code on the node-node adjacency matrices. The matrix is 300x300. Also, I need to report my results along with the computation time in seconds
0
When I compile my mex with the "-g" argument, a PDB file is created which allows me to Attach to the Matlab Process.

This works OK.

However, I'm finding that if I change any part of the source code, then recompile the mex and Attach to Matlab again, my breakpoints are not ever hit again.

The solution is to exit Matlab, restart Matlab, rebuild the  mex and re-attach.  Then, magically, it works again.

But it's a royal pain to have to continue exiting Matlab every time I make a small code change.

Does anyone know what the solution is?

Thanks,
0
You can refer to section 4.3.1 in this article if you want.

Problem: Given a reference point and a direction, I need to find the core of a line scratch.


  1. To do that, according to the article, I need to select a prominent point on the line-scratch and that point would be used as the reference point pR.
  2. Then start a search from that reference point, proceeding on both sides of the line along the direction dS.
  3. If pI is our current point at column k (shown in yellow here),
    • take 5 points adjacent to pI at column k+1 (shown in blue here).
    • find the point with the largest similarity value.
    • add the point to the core.

pixel-candidatesWe will use a specific function as the similarity measure. That function uses correlation, among other things, as a measure.

equation
  1. pI is the i-th pixel at the column-k.
  2. w1 and w2 are constants with values 0.75 and 0.25 respectively.
  3. cG is a global correlation factor measured between a matrix centered at pR and another matrix pKi which has a center at pI.
  4. g is a Gaussian function computed at pI.
  5. cL is a local correlation factor measured between a matrix centered at pK_1s and another matrix pKi which has a center at pI.
  6. pK_1s is the last included point at the core.

Implementation
Please, see the source code later in this question.

What is the problem I am facing right now?
 
  1.  I am not sure whether the matrices (i.e. pKi, matrix around pR, pI and so on) I am using are taken correctly.
  2.  I am not sure about the usage of dS.
0
I am very new to image processing and Matlab. I am working with RGB image and used SLIC algorithm to generate superpixel for an image. By using regionprops to calculate the superpixel properties.

[Rcounts binlocations]=imhist(ImageRED);
[Gcounts binlocations]=imhist(ImageGREEN);
[Bcounts binlocations]=imhist(ImageBLUE);
Q1: I have 48 superpixels with Counts(R,G,B channels) it is giving me 256*1 double(most of them are zero). Can anybody explain how to refine them to get each superpixel histogram?

Q2: How can I compare and calculate the distance between two specific superpixel histograms?

Any help is greatly appreciated. Thanks in advance
0
how can I add a constraint for vibration damper in a SUV vehicle model meant to demonstrate a rollover
0
How to write program for  encryption and decryption input text using RC4 algorithm in Matlab?
0
how i can apply fuzzy logic for this problem? Or is there any other technique i can use for my problem?

Input : parameter values Output : (1) OLTP , (2) DSS , (3) % of OLTP and % of DSS

I have to classify between 3 classes as OLTP, DSS and mix type. if my input matches with OLTP or DSS type it return crisp class. if it matches with mix type it returns the percentage of OLTP and DSS
0
How can i apply fuzzy logic for this problem? Or is there any other technique i can use for my problem?

Input : parameter values Output : (1) OLTP , (2) DSS , (3) % of OLTP and % of DSS

I have to classify between 3 classes as OLTP, DSS and mix type. if my input matches with OLTP or DSS type it return crisp class. if it matches with mix type it returns the percentage of OLTP and DSS.
0
Two vehicles update their position using latitude and longitude using .csv file. Plot the graph for two vehicles in a single graph to detect the collision.
0
Ask an Anonymous Question!
LVL 11
Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

I have attached the file of Matlab output. How to detect the intersection points red dots. Whenever it detect the red dot at intersection alert message should be displayed.
curveintersectionsexample.png
0
Hi, I am beginner in Matlab, need help or advise on how to do this? If i have 2 image in gallery (one basketball image and one badminton image)-Basketball.JPG/Badminton.JPG I created GUI. Then i am able to upload the one of the image. But how do i compare this upload image with the 2images in gallery. So that if uploaded image matches Basketball, it will display Basketball. and if uploaded image matches Badminton,it will display Badminton.
0
Hi

in the following code I'm searching for a match of indexes between 2 files , if I found a match take -6,6 elements from the 1st file .

I need to save the found data as (1,13) . (data ) array shows the elements as I print it when I run the code  but after finishing executing only the last element is saved .

earFilename = 'EAR_v1.txt';
stateFilename = 'output_close_tags_video_1.txt';

% read EAR values
 earfile = fopen(earFilename,'r');
 formatSpec = '%d %f %f';
 sizeA = [3 Inf];

earVector = fscanf(earfile, formatSpec, sizeA);
earVector = earVector';

% read state file
 statefile = fopen(stateFilename,'r');
 formatSpec = '%d %*s';
 sizeA = [1 Inf];

   stateVector = fscanf(statefile, formatSpec,sizeA);
   stateVector = stateVector';

% create a dataset containing framenumber, EAR, state
dataset = [earVector, -1*ones(size(earVector,1),1)];

% for each positive state, +-6 frame are marked as positive
data=[];
for i = stateVector'
  rowNumber = find(dataset==i);
  for j = -6:6
      data=(rowNumber+j);
      disp(data)

Open in new window

0
I am using MATLAB 2009,I have a micro-structure image and I transformed into greyscale image and then to BW.  Now I want to know the number of pixels along the scale bar (scale bar width is one pixel size), in order to calculate grain size. Please help me to find out How many pixels in the line of specified length with constant width of pixel size. using MATLAB. or suggest me other way to find the grain size from the microstructure image.
Thank you in Advance.
0
I want to find out principal curvatures for a image in MATLAB.  How to find it out and how will be its code in MATLAB
0

MATLAB Programming

374

Solutions

444

Contributors

MATLAB is a numerical computing environment and proprietary fourth-generation programming language. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, Fortran and Python. Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and model-based design for dynamic and embedded systems.

Top Experts In
MATLAB Programming
<
Monthly
>