matlab questions

matlab questions

  • All Sites

2 answers

Saving a matrix in Matlab in a folder different from the working directory?

Is there a way to save a matrix in Matlab in a folder different from the working directory? Suppose the current working directory is /Users/username/Desktop/Paper1 and the code is clear all load A ...

2 answers | 4 mins ago by user3285148 on Stack Overflow
0 answers

How to read data every second in serial communications using matlab

I would like to read data every one second from the device but i am unable to do it. I have tried with the following code. Here is the code... ...

0 answers

looking for a saliency map detection code for video processing

i am looking for a code or an application which can extract the salient object out of a video considering both context and motion , or an algorithm just for motion saliency map detection (motion ...

0 answers

mex file not executing in Matlab 7.5.0 (R2007b)

I created a mex file of a matlab file test.m from matlab R2012b using matlab coder. I got the output file test_mex.mexa64 . I was hoping to use this mex file in Matlab 7.5.0 (R2007b) but it shows the ...

0 answers

Plot a Density graph in Matlab

I want to draw a plot like where in this graph value of 1 is displayed by a white dot and a value of 0 by a black dot. It should display the resulting value of the norm given x and y coordinates ...

0 answers

Matlab: Gradient descent on Symbolic expression

Is there a way to do gradient descent to solve a few parameters in an equation represented as a symbolic expression? For example, I have the following symbolic equation: ax + by + c*z - 5 = 0 I ...

6 answers

Matlab identity shift matrix

Is there any inline command to generate shifted identity matrix in MATLAB? A=[ ... 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 ...

6 answers | 26 mins ago by zahmati on Stack Overflow
3 answers

Matlab Coder : Matlab Array to C Array

I used matlab coder to convert a matlab code to C. The simple array I had defined in matlab got converted to a complicated struct in C. struct emxArray_real_T { double *data; int *size; int ...

3 answers | 28 mins ago by user4009004 on Stack Overflow
1 answer

Finding minimum non-zero element in yalmip

I have a vector x, 1x4 of sdpvar, in Matlab using Yalmip, no negative values. I want to find the minimum non-zero element. My immediate attempt was min(x(x>0)). However conditional indexing is not ...

1 answers | 39 mins ago by P D Pedersen on Stack Overflow
0 answers

alpha function in Octave not yet implemented

I'm trying to reproduce the really cool plot from this SO answer. Here is my Saturn Fiddle for the code. However, I'm getting the error alpha not yet implemented in Octave How can achieve the ...

0 answers

Using MATLAB shared library in visual studio c++

I have a m-file in MATLAB.It calulates normxcorr2 between an image and a template as follow: function norm_res = TMatch(temp,image) c = normxcorr2(temp,image); norm_res = max(c(:)); when I ...

0 answers

Matlab: Controlling amount of output values for variables in an ODE

I have an ODE function that uses many intermediate equations and I have found a way to export them to a text file: function dFfuncvecdW = ODE(W,Ffuncvec); X = Ffuncvec(1); y = Ffuncvec(2); #lots ...

0 answers

Conversion from 4D cell array to 2D matrix

I have a 4D-cell array designated as A{m,i,j,h}, serving as a store for large amounts of numerical data during a nested-loop portion of my script. Some of the cell entries will be blank [ ]. I want ...

2 answers

Matlab: Exporting variables from ODE45

I have an ODE that uses many functions. I wish to export these "helper" functions so that I may graph them vs the independent variable of the ODE. function dFfuncvecdW = ODE(W,Ffuncvec); X = ...

2 answers | 1 hour ago by 22134484 on Stack Overflow
1 answer

X-means algorithm in Matlab

I want to simulate X-means algorithm [1] in Matlab. I have some questions about this algorithm. X-means Algorithm Steps: (1) Initialize K = Kmin. (2) Run K-means algorithm. (3) FOR k = 1,. . . ...

0 answers

Matlab Color Quantization

I'm currently working on project which is related with color quantization.The algorithm implies as initial step k-means algorithm . My code untill now : N = 10; K=7; I=imread('baboon.bmp'); Idouble ...

1 answer

MATLAB: symbolic differentiate f with respect to x(t)?

I have a function f(x(t))=sin(x(t)) that I would like to differentiate in MATLAB sometimes with respect to t, sometimes with respect to x(t). In MATLAB, I enter: >> syms x(t); >> ...

1 answer

matlab: splitting small arrays by latitude/longitude into individual grid cells of one large array

I have multiple satellite orbit paths that cover different latitudes/longitudes, but are all bounded by the same overall lat/lon grid (below). I am trying to split the data from each orbit path into ...

1 answer

How to draw a graph with specific requirement?

Recently, I read a paper by Xiao, Lin, Stephen Boyd, and Sanjay Lall. "A scheme for robust distributed sensor fusion based on average consensus." Information Processing in Sensor Networks, ...

1 answers | 2 hours ago by Wangyan Li on Stack Overflow
1 answer

Draw rectangle graph when multiple rows exist in Matlab

I have 2 rows data as follows : STA0 = '0 -> 2 1.000000 1.000200 A-MPDU 1.000000 1.000100 SUCCESS 1.000100 1.000200 FAIL NO' '0 NO NaN 1.000270 1.000570 BACKOFF NaN NaN NO NaN NaN NO ...

1 answers | 2 hours ago by user2290560 on Stack Overflow
1 answer

Evaluating a matlab function in C# that requires a matrix input

I made a function for a neural network I created inside matlab. I can successfully load the function in c#, but I don't know how I enter a matrix as the input as arrays don't work. Original Matlab ...

1 answers | 2 hours ago by Mnoi on Stack Overflow
2 answers

Conditional text import or import by header name - MATLAB

Is there a way to perform conditional text import within MATLAB? e.g. with a tab-delimited .txt file in this format: Type A B C D E A 5000 2 5 16 19 A 5000 3 4 5 4 A ...

2 answers | 2 hours ago by AnnaSchumann on Stack Overflow
0 answers

Eigen / ODEINT C++ slower than matlab?

I've written a simple program that uses an ode solver to find solutions to the n-rooks problem. This is a very simple program, in either MatLab or C++, but this is the first time that I try to code it ...

1 answer

Multiple queries (OR statements) using find

Currently to perform multiple queries using find, I invoke each query individually separated by | index = find(strcmp(data{:,{'type'}},'A') | strcmp(data{:,{'type'}},'B') | ...

1 answers | 2 hours ago by AnnaSchumann on Stack Overflow
0 answers

executing an instruction in matlab function called in C #

I have a c# code that reads measurements from multiple sensors via the serial communication COM16. But at each instant I can see only the current value. How can I send these data in real time to ...

1 answer

Verify this matlab code

I want to plot the fractal generated by the functions: x(k+1)=y(k)(1+sin(0.7x(k))-1.2+sqrt(|x|)) y(k+1)=0.21-x(k) with the initial conditions y(0)=x(0)=0, then I did the following code. ...

1 answers | 3 hours ago by user162343 on Stack Overflow
2 answers

How to plot the discrte form of the logistic model in matlab

I want to plot y(k) againts k of the following formula in matlab: y(k+1)=r(y(k))(1-y(k)) So I did the following: %Logistic model in its discrete form. r=2.5; y=rand(1); for j=1:100 ...

2 answers | 3 hours ago by user162343 on Stack Overflow
0 answers

correct way for Zero padding

Here in the code below, I am taking fft of my data and plotting it. Moreover, I am doing zero padding by multiplying the signal length by 1000. Is it the correct way for Zero padding? Moreover, am I ...

0 answers

back ground removal of cropped images

I have a hard problem that needs your help. My project is to detect abnormal activities of elderly people, so I need to remove the background of person .please help to me sir

0 answers

how to link between FIR filter and genetic algorithm in Matlab to mitigate noise from signal?

how can I write Fitness function for genetic algorithm and link it with FIR Filter to remove noise from the signal for any communication system ? I have a signal with noise and I want to remove this ...

15 30 50 per page
1 2 3