4 answers

Moving average for time series with not-equal intervls

I have a dataset for price of the ticker on the stock exchange: time - price. But intervals between data points are not equal - from 1 to 2 minutes. What is the best practice to calculate moving ...

0 answers

Using “Solve(f(x)=c,x)” in matlab…only getting 1 answer

So, I am trying to calculate a set of PDE separation of variables eigenvalues in matlab lambdaArray = solve(A*D-B*C==0,lambda) A*D-B*C is a symbolic expression involving lambda I am only getting …

1 answer

Is the official MATLAB computer vision toolbox actually OpenCV?

I can't help but notice that the MATLAB documentation for the Computer Vision toolbox has a very familiar feel, as if it is a re-write of the OpenCV docs and examples. This is the MATLAB toolbox …

1 answer

Input parser interdependent optional argument

In the following function, I tried to let Pt be on optional input parameter. In case Pt is not specified, it needs other optional parameters to be computed (that part works). But when I specify it: …

0 answers

Memory block alternative that ISN'T fixed in minor time step?

I have a model with some inputs that are fed into a CMEX S-Function via the Memory block, and the S-Function provides outputs based on these inputs, and those inputs are fed back into the S-Function. …

1 answer

MATLAB rotate xtick labels

I cannot figure out how to rotate my xtick labels in a 3d graph. Someone previously suggested: set(get(gca,'xlabel'), 'Rotation',90) But when I do this, nothing changes. The whole code is: width …

0 answers

shape context matching technique

I'm trying to implement shape context matching algorithm which is Calculate the distance of a point to all other points. Normalize the distance by mean distance. Create logarithmic distance scale …

2 answers

FFT of a real symmetric vector is not real and symmetric

I am having a hard time understanding what should be a simple concept. I have constructed a vector in MATLAB that is real and symmetric. When I take the FFT in MATLAB, the result has a significant ...

3 answers

How to generate a random integer that is either 0 or 1 in MATLAB

I searched the MATLAB documentation for how to generate a random integer that is either a 0 or a 1. I stumbled upon the two functions randint and randi. randint appears to be deprecated in my version …

3 answers | 1 hour ago by jacks4jokers on Stack Overflow stackoverflow.com
0 answers

What is an efficient way of running a logistic regression for large data sets (200 million by 2 variables)?

I currently am trying to run a logistic regression model. My data has two variables, one response variable and one predictor variable. The catch is that I have 200 million observations. I am trying to …

1 answer

Is there a way to write MATLAB objects to memory?

Right now I am going through a large excel database (of over 16,000) entries, and turning the entries into objects of a class I created. Because it takes so long to go through the database and create …

1 answer

how to calculate the distance between two vectors in matlab

can you help me, I have 480(rows)*256(columns) which extracted by LBP operator.so i need to get the similarity matrices to apply the verification scenario. e.g vector one with itself will give zero …

2 answers

Connect to Matlab engine from C in Linux

I'm trying to call the Matlab engine programatically from a C program on Linux (Matlab r2009a, Ubuntu 9.10). I've got my own code (which works in Windows), but for now I'm just trying to get the ...

2 answers

What is the c++ translation for 'textscan' function from Matlab?

What is a simple translation in code for 'textscan' from matlab into C or C++? I am using Ubuntu and I am trying to translate a Matlab code into C++. Thank you very much.

2 answers | 2 hours ago by js0823 on Stack Overflow stackoverflow.com
3 answers

Matlab: Plotting multiple points with same coordinates

I have some data that I want to plot in MATLAB. The data consists of x and y coordinates of the points that I want. At the moment, I am using the plot function to plot these points. The data has a …

3 answers | 2 hours ago by Ankit on Stack Overflow stackoverflow.com
2 answers

Why is my Matlab for-loop code faster than my vectorized version

I had always heard that vectorized code runs faster than for loops in MATLAB. However, when I tried vectorizing my MATLAB code it seemed to run slower. I used tic and toc to measure the times. I ...

3 answers

Finding sub-matrix with minimum elementwise sum

I have a symmetric m-by-m matrix A. Each element has a value between 0 and 1. I now want to choose n rows / columns of A which form an n-by-n sub-matrix B. The criteria for choosing these elements, …

3 answers | 2 hours ago by Karnivaurus on Stack Overflow stackoverflow.com
2 answers

How compile on linux KNN CUDA?

Recently, I found knn CUDA which is a group of Mex file that implement knn search based on brute force, but in the README.md I have not found the way to compile this files in matlab using a linux …

2 answers | 3 hours ago by mrDataos on Stack Overflow stackoverflow.com
2 answers

how to open a file from a GUI?

How can I open a script in editor from a GUI push button callback? I've tried: function load_Callback(hObject, eventdata, handles) uiopen(myfile.m) But it doesn't work! Cheers, Toby

1 answer

Matlab: converting symbolic to function handle, values returned not double

I have some obscurely long symbolic expression of 3 variables (g_eq), which i would like to minimize with some constraints. I am trying to do so by converting it to a function handle and using fmicon: …

0 answers

2D-DWT steganography using convolutional codes

I am trying to replicate the results of the following work regarding steganographic algorithm based on DWT and convolutional codes which should be robust enough to survive JPEG compression: ...

1 answer

List of MATLAB code analyzer message IDs

I'd like to find a list of the message IDs of the built-in code analyzer warning messages used for suppressing those messages either on a single line or in a file (see here). I know you can search by …

1 answers | 4 hours ago by orenyk on Stack Overflow stackoverflow.com
1 answer

Convert output from symbolic math (sym) to float

My question is similar to this question but I believe it to be more general. I use Matlab's symbolic math toolbox to solve an equation: MAZ = 0.5; MAU = 1.0; XI = 1.0; ALPHA = 2.0; DRG = 0.5; SRG …

0 answers

I cannot install Matlab 2014a on OS X Yosemite 10.10 public beta

When I install Matlab 2014a on OS X Yosemite 10.10 public beta, it shows Matlab logo and then it says: “Install MATLAB quit unexpectedly.” 1.I install JDK/JRE before I try to install Matlab, but it …

1 answer

How to check TWO key pressed in Matlab?

I have a Matlab GUI with many buttons. Now I want to set some shotcuts to the button. Actually I can check for one button and it works fine. My questin is how I can check if two buttons will be press? …

5 answers

MATLAB: Using interpolation to replace missing values (NaN)

I have cell array each containing a sequence of values as a row vector. The sequences contain some missing values represented by NaN. I would like to replace all NaNs using some sort of interpolation …

1 answer

Separate 2 video streams from one MPEG-2 file into 2 files

I'm really rookie in manipulating with video files and I have question. I have one MPEG-2 file with two video streams synchronized by time (first from RGB camera and second from thermal camera). I …

1 answers | 6 hours ago by Martej on Stack Overflow stackoverflow.com
1 answer

PDF plot Matlab

I have fitted 1-D data with gaussian mixture model X = 1000*1 observation data gm = gmdistribution.fit(X,2); And it gives, gm = Gaussian mixture distribution with 2 components in 1 dimensions …

1 answers | 7 hours ago by user3891431 on Stack Overflow stackoverflow.com
2 answers

MATLAB parfor how to slice a matrix

I have a little parfor test script which gives the warning in the title. The code is this out = zeros(10, 1); in = rand(5e8, 10); tic parfor i = 1:10 for j = 1:5e8 p = ...

2 answers | 7 hours ago by Patrik on Stack Overflow stackoverflow.com
2 answers

MATLAB: overwriting images using print function

I'm using the print function in MATLAB to write images of plots, something like that print(figure(1),'-dpng','-r300',filename); But apparently the images are not overwritten, and the original ...

2 answers | 7 hours ago by gerardpc on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3