The Swing project crashed
In the java project I called a MATLAB project. I can run the project in the Console (The runtime is over 5 seconds), but when I run it in the GUI(Swing) part, it crashed with the following report. ...
Identifying data outliers
I have a data set organized into a structure. I have a large number of sensors, and each has four readings a through d, so the structure D contains D.sensorID, D.a, D.b, D.c, and D.d. I'm looking for …
Drawing 256 squares/rectangles in MATLAB
I am trying to draw 256 small sized squares using MATLAB rectangle function. If I am drawing abut 10 squares then the following works fine: for i=1:2:40 rectangle('Position',[5,3+i,0.3,0.3],... …
How can i display date in a 1 by 1 array when i use datestr?
I use datestr to transfer 732154.873773148 into 26-Jul-2004 20:58:14, but when i ouput it to a .csv file, it will be an 1*20 array..., but what i want is to store it in a 1*1 array, how should i do? …
Gracefully quit from mex file if there is a memory allocation error
I have a mex function that takes a double precision input vector, downcasts the precision to a temporary single precision vector, does some processing and then upcasts the result of the processing to …
Set X11 Display MATLAB
I am having a problem when installing MATLAB on Ubuntu 12.04! Installing ... Error: Installation cannot proceed. You may either: Set an X11 display, and restart the install process Use the silent …
Simulating result by Monte Carlo Simulation
I have three variables, lets say a, b and c, i have generated 10,000 random numbers of those variables by normal distribution. Now i want to run monte carlo simulation to get the result in 1000 times. …
how i can read images from multiple folder in matlab?
My question how I have folder of image organized as Database -> CASIA Iris Image Database (version 1.0) -> folder001(this folder change to 001to 108) -> previouse folder contains two folder each of …
Convert a matrix of type double to image in Matlab
i have problem in converting a matrix of type double to image.iam using imwrite for this but each time, the error is too many input arguments. the matrix has values from 0 to 255 but the type is ...
Matlab / Microsoft Visual C++ 2010 Express: What is “error LNK2019: unresolved external symbol”?
I am trying to create a simple C++ class and a Matlab mex file. My code is as follows: Matlab: mexTest1.cpp #include "mex.h" #include "K:\\My Documents\\Visual Studio ...
MATLAB - understanding structure of Event location function
In my textbook I have encountered an example of a function I am supposed to use when specifying an event location for a system of ODEs. The function example is as follows: function [value, ...
How to calculate p-value for t-test in MATLAB?
Is there some simple way of calculating of P-value of T-Test in matlab. I found something like it however I think that id do not return correct values: Pval=2*(1-tcdf(abs(t),n-2)) . I want to ...
Receive Matlab/simulink UDP blocks in other software
Can we send Matlab/Simulink UDP blocks to other software like eclipse ? could eclipse read/use that for building android apps ? How should I do that ? when sending data through UDP Send block of an …
Matlab:K-means clustering
I have a matrice of A(369x10) which I want to cluster in 19 clusters. I use this method [idx ctrs]=kmeans(A,19) which yields idx(369x1) and ctrs(19x10) I get the point up to here.All my rows in A …
Call python function from MATLAB
I need to call a python function from MATLAB. Any ideas how can I do this?
Partition a positive definite square matrix into two indentical matrix
simply i want to partition a n*n positive definite matrix into an identical n*r matrix B where r is arbitrary, in the other word: B*B^T=A (n*r)*(n*r)^T=(n*n) Edit: i think it was my fault ...
How to remove background marking in dicom images
it sounds silly, but it really annoy me. I will describe the problem some DICOM images which come from digital mammography, have information about the breast side in the images themselves like ...
Error handling and interpolation in MATLAB
I'm currently working on a MATLAB script which spots errors from motion sensors where the data 'flips' hemisphere and records the inverse of what it should be. In addition to this there is a ...
Argument passing in Matlab
I have a function in matlab of the form fun(a,b,c), wherethe using may or may not give argument 'c' when he calls the function. I have to use a switch case on 'c' later in that function, and thus ...
get a 2d matrix out of a 3d matrix Matlab
I have a 3d mxnxt matrix , I want to be able to extract t 2d nxm matrices. In my case I have a 1024x1024x10 matrix and I want to have 10 images showing it to me. This is not reshaping, I want just …
How can I interpolate points in 3D space?
I have 3D space. And I know for example N points in this space (x1,y1,z1), (x2,y2,z2)..., (xn,yn,zn). I want to interplolate points, that is different from this. How can I do this in Matlab?
Using MATLAB, why does something like fts.data work in one directory but not another?
I am working with the financial tooldbox that has a type called FINTS. If I copy some code out of its toolbox directory to customize it, when I try do do something like fts.data, `I get The ...
How to get all files under a specific directory in MATLAB?
I need to get all those files under D:\dic and loop over them to further process individually. Does MATLAB support this kind of operations? It can be done in other scripts like PHP,Python...
How to find the correlation between scatter data and theoretical formula MATLAB?
I'm working on my thesis project on financial mathematics. One problem I'm having is that I want to find out if there is some correlation between a theoretical curve and scatter point data. Here is …
Matlab - can't display manually set axes
I create a figure and a panel of uicontrols. When I run the program, the panel overlays the default axes( or plot area if that is more appropriate). So, I want to have the panel at a certain position …
fmincon convergence time
I tried fmincon today and I found that it converges really fast. The values that it gives are also kind of perfect. I am not sure how. At the start it takes a big step. I had two parameters ...
how i can implement this algorithm in matlab
I am working on an iris recognition system. I want to find the pupil by analyzing connected components in the image using bwconncomp. The algorithm for pupil detection is as follows: Connected ...
Invoke Static Method of a .NET Generic Class in MATLAB?
How do you invoke a static method of a .NET generic class in MATLAB? For example, how would I invoke the static method Create shown below? public class A<T> { internal A() { } …
Reshape three column data frame to a matrix in Matlab
In MATLAB, I have data which looks like this: 5 7 1 5 8 2 5 9 3 6 7 3 6 8 3 6 9 2 where each column is an array (e.g. x = [5; 5; 5; 6; 6; 6]). I want the data to be …
What causes an invalid file identifier in MATLAB?
I have a MATLAB script that I could have sworn worked fine the last time I used it (a year ago). Now, I get this error: Invalid file identifier. Use fopen to generate a valid file identifier. If …