matlab questions

matlab questions

  • All Sites

2 answers

Resize an image in matlab

I want to resize my image using MATLAB.But actually I just want to increase the dimensions of the image without resizing the image itself.Say I have an image of 397x450 I want to make it into 600x600 ...

2 answers | 41 secs ago by Joker on Stack Overflow stackoverflow.com
0 answers

impulse calculation

i have written this matlab function to plot the impulse response. But it doesn't give me the desired output (impulse function). I am new to MATLAB, can anyone tell me where i went wrong with the code? ...

0 answers

Connecting 3 points on a 3d matrix

I have 3 points on a 3D matrix and I want to connect them. So far, I can create a line going from 1 point to another, but I want to essentially create a triangle connecting 3 of the points. Here's ...

4 answers

How can I find all the cells that have the same values in a multi-dimensional array in octave / matlab

How can I find all the cells that have the same values in a multi-dimensional array? I can get it partially to work with result=A(:,:,1)==A(:,:,2) but I'm not sure how to also include A(:,:,3) I ...

0 answers

how can I change the power of the numbers in axis of the plotted figure?

I want to plot z=(x,y) in which x and y are array with large numbers(for example 6.3251e8). matlab just changes the power of the numbers in the figure(for example 0.63251e9). I want the numbers of the ...

5 answers

How to combine matrix of different size in a cell array into a matrix in MATLAB

Similarly to How to combine vectors of different length in a cell array into matrix in MATLAB I would like to combine matrix having different dimension, stored in a cell array, into a matrix having ...

1 answer

updating a function in MATLAB

The code below works. You can copy-paste this code in case you don't understand what I ask below. In my gui, I have a pushbutton, popupmenu and edittext. Pushbutton enables adding new strings to ...

1 answers | 21 mins ago by kenes on Stack Overflow stackoverflow.com
0 answers

degtorad vs deg2rad in MATLAB?

Is there a difference between degtorad and deg2rad in MATLAB? Is there a benefit of one over the other, like speed (or some other metric I didn't think of)? ...

0 answers

Tune parameters with nested SVM in MATLAB

I have a dataset of 20 test subjects with 50 variables and a result vector of 1 and 0 that determines their state. I would like to set up a nested cross validation such that I in the inner folds ...

1 answer

Removing non-matching dates from two time series in matlab

I have two time series x and y which roughly cover the same period of time. The data is in daily form however there are some days that have data in one dataset but no data in the other. I wish to use ...

1 answers | 31 mins ago by BazD on Stack Overflow stackoverflow.com
1 answer

PCA for feature extraction MATLAB

I have a data matrix A of size N-by-M. I wanted use PCA for dimensionality reduction. I want to set the dimensions to 'k'. I understand that after feature extraction, I should get a Nxk matrix. I ...

1 answers | 35 mins ago by user2948166 on Stack Overflow stackoverflow.com
0 answers

Control number of matlab threads from Linux environment variables

I am configuring Matlab for a multi user cluster and want the users to request a specific number of cores when they are launching Matlab. For example, without controlling this, performing an inverse ...

5 answers

Matlab simple matrix manip

I'm new to Matlab and I want to achieve a very simple operation : I have a 792 x 1046 uint8 matrix called mg and want to convert its cells values (from 0 to 255) to values between 1 and 4 (1,2,3,4) in ...

5 answers | 49 mins ago by medarum on Stack Overflow stackoverflow.com
0 answers

Call subclass static method from inside superclass static method

I have a large set of small, related classes linked together by an interface class. All classes implement a static method, which retrieves and processes data specific to the class. The output of ...

0 answers

Wrap phase from image MATLAB

I am trying to unwrap the interference pattern that I got from the interferometre. However, the first step would be to wrap the phase, because I just got an image (intensity). I cannot post the image, ...

0 answers

Generating bernoulli variables for different lambda's

In order to generate $M$ paths of length $N$ I have to generate Bernoulli variables. In Matlab I used: Q=binornd(1,lambda,L,N); Now I want to generate this for a sequence of values lf lambda, but I ...

2 answers

figure('Position',[x y width height]) won't go over height 800

I'm using an external monitor. My notebook has display of height 800 px, but monitor has over 1000 px. If I'm running the script on external monitor screenSize = get(0,'MonitorPositions'); figureSize ...

2 answers | 1 hour ago by user50222 on Stack Overflow stackoverflow.com
1 answer

Dynamically name a struct variable in MATLAB

I have several files "2011-01-01.txt", "2013-01-02.txt", "2015-02-01.txt", etc. I wish to create a struct variable for each of the file such that (the values are made up): ...

0 answers

Would it be more efficient to switch to a different ODE solver?

Warning, I'm not certain if this question belongs on here or Math Stack Exchange. It's primarily a question of performance, but it heavily involves a differential equation solver. Anyway, in Matlab, ...

2 answers

imquantsize function in matlab

I'm new to Matlab and trying to take a tif and find and apply multiple thresholds. I saved the tif using I=imread('full_file_directory') and used multithresh to find the threshold values. However ...

3 answers

How to display with n decimal places in Matlab

I was wondering how to use command to set up displaying with n decimal places in Matlab? Must n be restricted to some predetermined numbers? Or one can just specify any for n? Thanks and regards!

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

In Matlab classdef can you define an “any_function”

In matlab's classdef, can you define a method that executes any_function that has called it? For example, say I have defined this custom class type in matlab: classdef custfloat properties value ...

1 answer

How to solve cudaSetDevice Error and run this deep-learning code correctly?

I use the following GPU code on the facial expression recognition: http://code.google.com/p/deep-learning-faces/ My system is the same as the authors' but the CUDA version is a little higher (5.5) ...

1 answer

Forcestop GlobalSearch function in matlab

I'm having an issue with an optimization problem. I think the code works fine, but I would like to force-stop it when it has reached a few optimal values(under 1e-11). The only solution I have found ...

1 answers | 3 hours ago by MaiGoL7 on Stack Overflow stackoverflow.com
1 answer

Converting a floating point number to string

I want to convert a floating point number to string. f=0.0000 str=num2str(f,4); This give me this- str= 0 But I wanted to keep the result till 4 decimal points.I understand using num2str(f,4) ...

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

Convert GML file to adjacency matrix in matlab

I have a GML file of a directed graph (Political blogs). I want to use this graph in Matlab as an adjacency matrix. How can I convert it? Thanks.

1 answer

Matlab Control Toolbox root locus

I'm using the control system toolbox provided by matlab to estimate the gains of my controller: using root locus design I get a graph like this one . My question is: what is the x on the x-axis? ...

1 answers | 3 hours ago by Daniel on Robotics robotics.stackexchange.com
1 answer

How to find Lyapunov exponent for coupled system

Answer gives a software for calculating conditional lyapunov exponent (CLE) for coupled oscillators in chaos synchronization. However, its hard to follow and there is no graphical output of the plot ...

1 answer

Getting hardware information in MATLAB in a platform-independent way

I would like to find hardware information such as the hardware ID, manufacturer and type of graphics card, and CPU type etc. from within MATLAB. Preferably without installing any additional toolbox or ...

2 answers

Delete row from matrix given an id- Matlab

How can I delete a certain row from a matrix depending on the 1st column value? For example: A=[1 2 3;3 4 5;5 6 7] where the values of the first column represent the ids and I want to delete the row ...

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