Answered
Generating random numbers from histogram data
Sam - *PD* is a 4x2 matrix. Your values of *R* are in the interval (0,1). For every one of these values that you pass in to yo...

12 years ago | 0

| accepted

Answered
in Regard of Feval error
Rahul - I looked at the code in your attachment (next time, just attach the m-file - there is no need to paste its contents into...

12 years ago | 2

| accepted

Answered
Generate new variables based on expressions in structure array using loops -- example provided need help to fix
Jeff - see the <http://www.mathworks.com/help/matlab/matlab_prog/generate-field-names-from-variables.html generate field names f...

12 years ago | 0

Answered
Use mex files in matlab for MAC
Rui - it may be helpful to attach the files so that we know what you code you have. I suspect that you have at least one m-file...

12 years ago | 2

| accepted

Answered
I have latitudes and longitudes that are received with 30 seconds interval. I want to display an arrow in the direction of next lat,long. can anyone help me? thanks
How are you interfacing with Google Earth? What are the lines of code that you have written that plots the data on the "map"? ...

12 years ago | 0

Answered
why FFT results in high frequency range are not correct?
Ali - what is the line (or lines) of code that you are using to do the FFT? What is the block size, *N*? If I follow the exa...

12 years ago | 0

| accepted

Answered
How to get output in rows for running given matlab program(attached) 2 times for same inputs ?
reshdev - if you want to re-run your function multiple times with the same input, then just pass in a second input parameter ind...

12 years ago | 0

| accepted

Answered
How to load .dat files containing 1st row and 2nd row as text string and remaining as .dat file format in matlab?
Chris - do you have to do this for multiple files, or is it just the one file? It almost seems simpler to just use <http://www....

12 years ago | 0

Answered
Three dimensional arrays with poly2mask in each page
Martha - according to <http://www.mathworks.com/help/images/ref/poly2mask.html poly2mask>, there are only four inputs to this fu...

12 years ago | 0

| accepted

Answered
explanation for syntax of arrayfun
Abirami - see the documentation at <http://www.mathworks.com/help/matlab/ref/arrayfun.html arrayfun> for details on the usage of...

12 years ago | 3

| accepted

Answered
How to write multiple levels of if-else statements
Tim - there are a couple of things that you need to address in the conditions for your if/elseif statements. Replace the si...

12 years ago | 0

| accepted

Answered
MEX wrap around SDL2 library (Simple DirectMedia Layer)
I grabbed SDL 2.0.3 (for OS X), compiled the above, and observed the same behaviour as you. Though I think that the exception i...

12 years ago | 0

Answered
how to give different combinations of inputs within the program( i want to skip input questions)?
As reshdev had indicated in his last comment, _i want to skip input questions and pass matrix like you written_, then we can upd...

12 years ago | 1

| accepted

Answered
how to perform bitwise XOR operation and scramble two matrices
Abirami - try the following. % create the char vector in this order, since A==0, G==1, C==2, % and T==3, the index for any...

12 years ago | 0

Answered
How do I pass variables from a MATLAB script to C++?
Paul - if you just want to call the Windows *SetCursorPos* API from within MATLAB, then you can create a simple C-file based on ...

12 years ago | 0

Answered
How do I assign unique values to a i*j matrix/grid?
Sarah - the problem is in the outer *for* loop for i=n(1):n(length(n)) Since initial value (initval) is *n(1)=3*, end va...

12 years ago | 0

| accepted

Answered
how to make subplot visible off along with the ploted line?
Deepak - by calling *set(handle,'Visible','off')*, you are setting the visibility of the graphics object associated with *handle...

12 years ago | 0

Answered
Help with GUI - Push button
aurc89 - assuming that you have used GUIDE, the callback function for the _save_ button would look something like function s...

12 years ago | 0

| accepted

Answered
How to divide a line into several parts and obtain the coordinates?
Martha - I think that you have the write idea with your initialization of *New*, you just have to put it to use. Rather than *N...

12 years ago | 1

| accepted

Answered
How to print a text file in MATLAB?
Phan - since you want to create a text file, then use <http://www.mathworks.com/help/matlab/ref/fopen.html fopen> as fid = f...

12 years ago | 0

| accepted

Answered
index out of bounds
Hamid - What is the data type of the numbers in *Dof* and *Edof* - integers or floats? If floats, then you will not be able to u...

12 years ago | 0

Answered
Setting frames from mid video
Daevin - according to <http://www.mathworks.com/help/matlab/ref/videoreader.read.html videoreader.read>, it is possible to read ...

12 years ago | 1

| accepted

Answered
A question on Matlab and Visual Basic from Excel Please Help
Pepe - I created a very simple VB macro in Excel as Sub myFunction() Dim MatLab As Object Set MatLab = CreateO...

12 years ago | 0

Answered
I am getting error Index exceeds matrix dimensions. What am I missing here?
Adorn - the code in your question should be formatted so that it is readable. Please highlight it and press the *{} Code* butto...

12 years ago | 0

Answered
creating multiple variables from a vector
Shobhit - rather than creating multiple variables (which is possible but gets messy), why not just create a cell array of these ...

12 years ago | 0

| accepted

Answered
Scatter plot prevents update of contour plot. Any ideas why?
Kyle - I was able to reproduce the same behaviour with R2014a on OS X 10.8.5. Reducing the number of points that were being dis...

12 years ago | 1

| accepted

Answered
function handles to save data
Max - try the following. Suppose the output from one iteration of your loop is a 1x9 vector, and that there are 25 iterations. ...

12 years ago | 1

| accepted

Answered
how to make a compass vary with time
mohammed - take a look at <http://www.mathworks.com/help/matlab/ref/compass.html compass>. You can "embed" this in an axes obje...

12 years ago | 0

Answered
plotting windrose using Matlab
Shital - there are two options for specifying wind direction using <http://www.mathworks.com/matlabcentral/fileexchange/17748-wi...

12 years ago | 4

| accepted

Answered
Want Matlab code for Kalman Constraints
Pearleesh - presumably you found this code from <http://academic.csuohio.edu/simond/ConstrKF> which the author (Dan Simon) used ...

12 years ago | 0

Load more