0 answers

Fastest Way to Generate x Number of Random Variables

index = [10 100 1000 10000 100000] Let's say I wanted to generate 10, 100,...,100000 (corresponding to index above) exponential random variables with parameter 1/10. I of course did this with a for ...

0 answers

in matlab I am solving a diff eqn but sometime it ode45 takes long time to return,

and here is the code global a b c a=35 b=3 c=28 for R = a-3 : a+3 for N = b-2 : b+2 for L = c-2 : c+2 a=R; b=N; c=L; ode_interupt_demo plot3(x(:,3), x(:,2), x(:,1)); S= [R N L] pause(1) ...

2 answers

Rotating a gaussian function - matlab

Good day, I have code that stretches and rotates a gaussian 2d pdf as such: mu = [0 0]; Sigma = [1 0; 0 1]; Scale = [3 0; 0 1]; Theta = 10; Rotate = [cosd(Theta) -sind(Theta); sind(Theta) ...

2 answers | 24 mins ago by power2 on Stack Overflow stackoverflow.com
1 answer

Shortest path that visits all vertices in a directed complete weighted graph

Given: complete directed weighted graph. All weights are positive. Is there any simple way (heuristics?) to find the shortest (in terms of weights) path that visits all vertices? Number of vertices is ...

3 answers

Matlab's bsxfun() - what explains the performance differences when expanding along different dimensions?

In my line of work (econometrics/statistics), I frequently have to multiply matrices of different sizes and then perform additional operations on the resulting matrix. I have always relied on bsxfun() ...

1 answer

matlab how find linear trend from a time series

How would I go about finding a linear trend from a time series? I know the time series is y = {y1,...yn} or for the first case {1.000000000000000 0.917457418407746 0.683456229182811}. It's ...

1 answers | 2 hours ago by Blitzkayir on Stack Overflow stackoverflow.com
1 answer

Weighted Decision Making on the basis of Two Significance Indexes

I'm trying to make the best decision for assignment of books (some of the books have multiple authors that belong to different organizations). Only one author can be represented by a single book. I ...

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

Vectorized or single line evaluation of function array in MATLAB

In a previous question, a user asked about iterating over a cell array of anonymous functions. I am wondering whether there is a way to evaluate a set of functions without the explicit use of a for ...

2 answers

How to find the plane of intersection betweeen a plane and a 3d matrix

If I have a stack of images and the size is following, size(M) = [256 256 124]; I have 3 points and their coordinates are, coor_a = [100,100,124]; coor_b = [256,156,0]; coor_c = [156,256,0]; ...

2 answers | 2 hours ago by lic7 on Stack Overflow stackoverflow.com
1 answer

MATLAB, how to compute the distances between large coordinate sets, without exceeding memory constraints?

(using MATLAB) I have a large coordinate matrix and a large sparse adjacency matrix for which coordinates are connected to each other. I had asked previously on SO, how to efficiently compute these ...

1 answer

Square wave function for Matlab

I'm new to programming in Matlab. I'm trying to figure out how to calculate the following function: I know my code is off, I just wanted to start with some form of the function. I have attempted to ...

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

sortrows in the 2nd dimension of 3d matrix

I am trying to sort first row in the 2nd dimension of a 3d matrix in Matlab, but sortrows() doesn't work in this case. For example, I have a matrix like a(:,:,1) 1 2 4 3 1 6 2 0 5 a(:,:,2) 3 5 6 1 ...

2 answers

Matlab - approximation issue

I'm trying to approximate several points with a curve. My script looks like this: T = [ 0 5.67 13.28 20.18 26.84 37.74]; T = T'; eta = [0 54.33 70.91 73.56 73.29 76.]; eta = eta' f4 = fit(eta, T, ...

0 answers

data driven curve - MATLAB

I have several sets of data that I want to fit but not all of them look the same (some look like a Gaussian with one peak, some like two Gaussians with 2 peaks or Lorentzians). I wanted to try this ...

1 answer

Simulating a network that trained with ADAPT

I used ADAPT for incremental training a simple network, and i know that ADAPT changes weights and biases,i used this: clc clear all net = linearlayer([0 1 2]); pi = {[1; 1] [2;2]}; p = {[3 ;4] [5; 6] ...

1 answers | 7 hours ago by javan on Stack Overflow stackoverflow.com
1 answer

Why do imagesc and pcolor plots produce different output? Possible bug in MATLAB R2015a

From the MATLAB R2015a documentation, the functions pcolor, image and imagesc are expected to produce nearly the same output, being the only "practical" difference that pcolor outputs surfaces viewed ...

1 answers | 8 hours ago by Girardi on Stack Overflow stackoverflow.com
2 answers

Matlab min function and 'lt' operator

I'm using min function to find minimum value in Complex Double array and set return value to slider Min property. when user change slider value, find values that little than slider value. but min and ...

2 answers | 9 hours ago by Micle on Stack Overflow stackoverflow.com
0 answers

Running Matlab via PBS fails

I am trying to run Matlab 2013 via PBS and I get the following error: libXv.so.1: cannot open shared object file: No such file or directory I can run my code in Matlab's GUI mode though. I tried ...

9 hours ago by Sid on Stack Overflow stackoverflow.com
0 answers

How to upload multiple csv files using MATLAB script to access WEKA's SVM classification?

I am using Windows 7. I want to load multiple .csv files without header using the MATLAB code below. The last column of my .csv files has class labes, e.g., "Label1", "Label2", "Label3",... I want ...

2 answers

Segmenting License Plate Characters

I am facing problem in segmenting characters from license plate image. I have applied following method to extract license plate characters, -adaptive threshold the license plate image. -select ...

1 answer

Finding a matching row in two separate datasets in matlab

I have two correlated Nx3 datasets (one is xyz points, the other is the normal vector for those points). I have a point in my first dataset and now I want to find the matching row in the second ...

1 answers | 11 hours ago by user3433572 on Stack Overflow stackoverflow.com
1 answer

Compiling CUDA Mex Files using Visual Studio 2013 IDE

I am trying to compile following program, which is a CUDA mex file for MATLAB, using Visual Studio 2013. There are instructions available on MATLAB's official website only for C++ Mex files , not for ...

1 answer

Low frequency, high pass filter for MATLAB

I'm having real trouble trying to create/use a filter in MATLAB which is accurate enough at very low frequencies. I'm interested in a range of signals between 5 and 50Hz, the high band isn't too ...

1 answers | 11 hours ago by ritchie888 on Stack Overflow stackoverflow.com
1 answer

How to perform convolution using Fourier Series

OK let me cut to the chase. I am trying to use MATLAB to (i)generate the fourier series based on known coefficients and thereafter (ii) determine the output function when the impulse is known. So ...

6 answers

Split vector in MATLAB

I'm trying to elegantly split a vector. For example, vec = [1 2 3 4 5 6 7 8 9 10] According to another vector of 0's and 1's of the same length where the 1's indicate where the vector should be ...

6 answers | 13 hours ago by knitty on Stack Overflow stackoverflow.com
3 answers

Matlab create a matrix with values

I've written a function in matlab which generates a matrix using a loop. I was wondering if it is possible to generate the same results without a loop. X can either be a 1 x 50, 2 x 50, 3 x 50, etc...

1 answer

How do I make figure full screen in Matlab?

please, this question is not that simple, you may think it is already answered but it is not the case. I know how to make a next figure in full screen : ...

4 answers

Matlab Rectangle not working after swapping x and y axes

I need to swap x and y axes and draw a rectangle. I do the swap with "view(-90, 90)" and axes are swapped correctly but the rectangle is not drawn. Code: axis([1 11 1 11]) xlabel('x') ylabel('y') ...

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

Converting characters inside file to upper case matlab

I want to convert all the characters inside a file to uppercase in matlab. I have searched in Matlab's documentation but I didn't find anything that helped. Any help is appreciated!

1 answers | 15 hours ago by syd26 on Stack Overflow stackoverflow.com
1 answer

How to detect a particular object in Digital Image -Matlab

I am just exploring Digital Image Processing this semester.I want to find out the number of fish present in a fish tank using Matlab Image processing Tool.I need some idea's and guides. FYI all the ...

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