2 answers

Saving mixed data cell array to ascii file in MATLAB

I get some data from an instrument that is formatted in a specific way. I need to load the data into MATLAB, manipulate some values, then save it back with the same format to load back into the ...

1 answer

Particular Function to Produce Vector Values

I have a function handle in matlab that I want to input a vector to return a vector that went through the function mapping. But this function varies in two parameters so I want to be able to input a …

52 mins ago
3 answers

Using errorbar() with semilogy() in MATLAB?

I'd like to plot data x & y with errorbars, ebar, and its fit, yfitted, on a semilog plot. This doesn't seem to work: figure; hold on; errorbar(x,y,ebar); semilogy(x,yfitted); Instead of ...

59 mins ago
0 answers

.dta to .mat or csv converter

Has anyone written a .dta to .mat or csv converter? I'm in a political science class that uses Stata, so the class provides data files in .dta format. I want to play with the data in Matlab instead, …

2 hours ago
1 answer

Cubic Equations in Javascript

I am trying to create a "cubic equations resolver app" in Javascript and I have a piece of code doing that in Matlab. It requires using complex numbers and i know that Javascript can't handle such ...

0 answers

Details of node in Tree regression, matlab

I am making a Tree regression using "classtreereg". My tree has 20 terminal nodes and I named my tree as "t2". How do I get the list of observations or points in each terminal node and save it to ...

2 hours ago
0 answers

Can someone tell me about the kNN search algo that Matlab uses?

I wrote a basic O(n^2) algorithm for a nearest neighbor search. As usual Matlab 2013a's knnsearch(..) method works a lot faster. Can someone tell me what kind of optimization they used in their ...

0 answers

sending image as byte array from matlab to java through sockets

I am trying to send images from a matlab server to a java client through a sockets. First I converted the image to a byte array and I used the readFully method on the client side which requires a ...

3 hours ago
1 answer

KNN Classifier using cross validation

I am trying to implement KNN classifier using the cross validation approach where I have different images of a certain character for training(e.g 5 images) and another two for testing. Now I get the …

1 answer

using diag command to construct circulant matrices

Here is the question: Write a MATLAB program which uses the diag command to generate n by n circulant matrices: given vector v = (v1 v2 v3 ....vn). Example of circulant matrices: A = [1 2 3 4 5; …

3 hours ago
1 answer

Apply Echo Off to a console application built from Matlab

I don't have the MATLAB Builder™ NE, and i need to plot some complicated graphs using values i get from a C# application. So i used the build tool within Matlab to build a Console Application, than i …

1 answer

plotting two figures using matlab plotyy

I am struggling to draw my two plots, one is a simple x=y and the other is a boxplot using plotyy. Here are the two : h1=boxplot(box_panda_8(:, [8 16 24 32 128]) ...

4 hours ago
1 answer

Gnuplot how plot 3d figures in a style similar to Matlab

I found gnuplot's 3d figure not very attractive. Is there a way to product a figure looks like this one: The key points are: 1) less density of x and y tics 2) grids 3) tics bars toward outside …

4 hours ago
0 answers

Quadratic Programming Formulation

I'm trying to solve the constrained orienteering problem in Matlab, my problem is I don't understand how to get the hessian matrix of an objective function like the one in this formulation ...

0 answers

Transform image to fit inside specified points

Suppose i have 2 images (of different sizes), an image of a wall and a generic banner. Via some calculations i have derived 4(x,y) points in the wall image which are to be the corners of the banner …

1 answer

Video steganography

I am working on Video steganography using Matlab I have completed my encryption on video successfully but the problem is that I am not able to retrieve my data back in decryption module. After ...

1 answer

Finding Local Min and Local Max Between Two Values In Matrix

I have finally been able to get an Excel sheet read in and get the data plotted as needed and to get the data averaged. However, now I am having issues trying to find the local min and local max ...

5 hours ago
1 answer

Loop going through one number multiple times

I want for each numbas, the primlist less than or equal to numbas is given. My programming is doing the right thing for each numbas, but multiple times. Because of this I cannot save PPRIMMS as a ...

6 hours ago
1 answer

Forward testing in matlab?

I am new to matlab. I have been going through a lot of the tutorials and the documentation. A lot of people here have helped.(looking at the code helps a lot. Now I want to go ahead and set-up a test …

6 hours ago
2 answers

MATLAB short way to find closest vector?

In my application, I need to find the "closest" (minimum Euclidean distance vector) to an input vector, among a set of vectors (i.e. a matrix) Therefore every single time I have to do this : ...

0 answers

Object of objects in matlab and VRML

Is Object Oriented Matlab's programming with VRML objects can support and collaborate with each other? Can an object of VRML can be called through multiple objects using the Object Oriented ...

7 hours ago
3 answers

switch/case inside for loop not working properly

I need to check each element of a matrix to see if it's something specific or not. I have to use switch/case for this piece of code. I have a vector like this : COUNTER=[counterA counterB counterC …

1 answer

Histogram (hist) not starting (and ending) in zero

I'm using the Matlab function "hist" to estimate the probability density function of a realization of a random process I have. I'm actually: 1) taking the histogram of h0 2) normalizing its area …

2 answers

finding the first value of one matrix after satisfying condition of another matrix

Please help me solve this problem... a = [1 2 3 4 5 6 7 8 9 10] b = [12 4 13 7 5 7 8 10 3 12] c = [4 5 3 2 6 7 5 3 4 5] I have to find the first value on a, if the value on b is less than 10 …

3 answers

I have vector of indexes. How to set ones at given index in each row?

I have a vector y with integer values from 1 to 10: octave> size(y) ans = 5000 1 I created zeros array y1: octave> size(y1) ans = 5000 10 I need to set 1 in each row of …

7 hours ago
6 answers

Find each element that is less than some element to its right

I need to find elements of a vector that are less than one of more elements that come after it. It's easy to do in a loop: x = some_vector_values; for m = 1 : length(x) if( any( x(m+1:end) > ...

1 answer

Best Way to Segment Lung Nodules in Matlab

I am working with images processing in Matlab. I am trying to segment out only malignant (cancerous) lung nodules. Initially I managed to segment out Lung and all possible nodules. I have used …

0 answers

configure SublimeREPL matlab

Im trying to run matlab scripts from sublime text 2. Using Mac OSX 10.6.8 and matlab 2012b. I installed sublime repl and just tried it, but it doesnt find matlab, or whatever it tries to run. Do I ...

1 answer

How to use array values as matrix coordinates to insert values in the matrix

I have two arrays x and y of size 4013. The values of x array are row indices and of y array are column indices. I want to create a matrix of size 512*512 and insert values using x and y indices. How …

8 hours ago
1 answer

Legend on MATLAB plot where every point is scattered individually

I am trying to get a legend on a scatter plot in Matlab, the problem is the way I plot the graph involves scattering each point (of which there are >10,000) individually going through a for loop. The …

8 hours ago
15 30 50 per page
1 2 3