matlab questions

matlab questions

  • All Sites

1 answer

Matlab crash when running user defined blocks in simulink

I created a user defined block with single input and single output in simulink and it works perfectly fine. But when i create a user defined block without an input, run this block in a simulink model, ...

0 answers

MATLAB : relocate matrix and edit indexes

function [ f ] = divideddiference( r ) %UNTITLED Summary of this function goes here % Detailed explanation goes here %r==point of interploation. ...

0 answers

transfer each row of a matrix to the field of a structure

I have a 100 by 2 matrix. I want to transfer each row of this matrix to the field of a structure without using loop. For loop solution: % Let's say matrix = rand(100,2); for ii = 1: size(matrix,1) ...

0 answers

Executing VideoReader('movie.mp4') takes so long in Matlab

I am trying to read many video files from a database and process them. I am using Matlab and my problem is that when I want to read a 10 minutes long full HD video I should wait so much and my ...

1 answer

DCT transform in image processing

I have an image and want to transfer it into discrete cosine transform space and then regenerate the image by using the lowest 25 percent parts,I know that I can use dct2 in matlab, but I do not know ...

0 answers

How to set the correct libsvm's parameters

I'm trying to resolve a classification task. This is my dataset in the features space. To map my dataset in the features space i have utilized PCA. I tried a leave-one-out cross-classification with ...

2 answers

How to remove a row from a matrix inside a cell array

I have a cell array (A) with size of 400 x 1 and each cell of this array includes a matrix with size 9 x 4. As such, it looks like this: A={[9x4 double];[9x4 double];...;[9x4 double]}; Now, I want ...

2 answers | 1 hour ago by user3185893 on Stack Overflow stackoverflow.com
0 answers

Creating a figure in guide is not functioning properly

So apparent I am not reading my code clearly or something strange is happening but every time I run this the it only creates one of the four figure which is normal but then when I click again it does ...

0 answers

create random matrices with elements 1 and 0

I want to create some 3*3random matrices that are composed of elements with value 1 and 0. in these random matrices every location of 1 value must be unique. I write something. it works, when I create ...

1 answer

Matlab axis label with normal and latex

I want my ylabel to have the word 'Frequency' in normal/default font, but I want the 'p' to be in latex. Is this possible? ylabel('Frequency ($p$)','Interpreter','latex', 'fontsize',10)

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

Matlab's errorbar with matrix of colors

Is it possible to use the function errorbar with matrices (so it plots several plots with error bars) and give it a matrix of colors to use for the plots? I haven't been able to make this work. Some ...

0 answers

Error while trying to build simmechnics model on arduino?

I have the a simulink model with simmechnics and arduino blocks. I am trying to build the model but the following error comes up " The call to realtime_make_rtw_hook, during the after_make hook ...

1 answer

how do i apply hanning function to my audio sample?

I am a university student. I am developing a music identification system for my final year project. According to "Robust Audio Fingerprint Extraction Algorithm Based on 2-D Chroma " research paper, ...

1 answer

Convert the standard colors from the old colormap to the new one

If I open a previously (before R2014b) saved figure, the colors I used, for instance r, k , ... would appear according to the colormap they have been saved with. What is the fast way to convert the ...

0 answers

limited number of items in the plot browser option in MATLAB

When dealing with figures including several plots, sometimes you want to select a number of plots. The way I usually do it is opening the plot browser in the view section and it mostly is good enough. ...

1 answer

separate 'entangled' vectors in Matlab

I have a set of three vectors (stored into a 3xN matrix) which are 'entangled' (e.g. some value in the second row should be in the third row and vice versa). This 'entanglement' is based on looking at ...

2 answers

How make a table in matlab

I want to make a simple table in Matlab, so i used this code: T := table(a = 13, c = 42) But it gives an error: xrd Undefined function 'T' for input arguments of type 'char'. ...

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

sort structure with respect to its field MATLAB

I have a structure which contains location(-x -y coord.) and type information of points: mystr(1).type = 'type2'; mystr(1).location = [5 7]; % [x y] = [5 7] mystr(2).type = 'type1'; mystr(2).location ...

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

Matlab: getting GUI handle value from a callback function when calling by another function

I am new to GUI programming for Matlab, so my question relates to that. Let's say that I create a GUI with GUIDE. In the creation function MyGUI_OpeningFcn(hObject, eventdata, handles, varargin) ...

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

error on install matlab2014b x86 “MSVCR110.dll is either not designed to run on Windows or it contains an error.”

I,m trying to install matlab 2014b x86 on my laptop, i install windows 7 professional 32 bit, visual studio 2012 and update 4. now in the first step to install matlab 2014b x86, i get this error: ...

1 answer

Matlab handle class handle size

I have a handle class and an array in which I store multiple copies of handles of the class objects I produced (sometimes up to 1000 copies of a single handle). I assumed the handles to the objects ...

2 answers

How to calculate exp(-x) using Taylor series

We know that the Taylor series expansion of $e^x$ is \begin{equation} e^x = \sum\limits_{i=1}^{\infty}\frac{x^{i-1}}{(i-1)!} \end{equation} If I have to use this formula to evaluate $e^{-20}$, how ...

0 answers

mex functions could not be resolved eclipse

I am trying to compile c++ code (which contain mex function like: mxGetNumberOfElement, mxCreateDoubleScalar,mxArray etc.) on eclipse (linux). I followed this instructions to configure eclipse. But ...

1 answer

Deploy an matlab file to executable

I want to deploy an m file into an executable. I am using mcc command: mcc -m epidemic.m. Epidemic is my function which takes no arguments and returns a vector and write that vector to txt. Mcc ...

1 answers | 4 hours ago by Jose Ramon on Stack Overflow stackoverflow.com
0 answers

import a continuous bitsream from workspace into simulink using “In” block and then buffer it using “buffer” block

how to import a bitsream form binary vector from workspace into simulink.Actually I have found that I can use simin block or In block but my binary vector is independant of time. I tried to use Const ...

1 answer

Link different properties of MATLAB axes

Is it possible to link, for example, the 'XLim' property of one MATLAB axis to the 'YLim' property of another axis? I have looked into linkaxes and linkprop but as far as I can tell, they can only ...

1 answers | 5 hours ago by Will Adler on Stack Overflow stackoverflow.com
1 answer

Segmentation in an image with a single object in MATLAB

Here is the picture: My goal is placing this bird in another image. I tried something with MATLAB, first rgb2gray then imhist to get the bird intensity, then I made a mask, but I always ended up ...

1 answer

Use integrator output as matrix input in simulink

I'm trying to solve a set of differential equations in matrix form in simulink. My issue is that the output of 2 of my integrators should be "x" and "y" from each and then I need those x and y values ...

1 answers | 5 hours ago by ez4nick on Stack Overflow stackoverflow.com
0 answers

Labels in ECG signal

I am trying to train ECG signal downloaded from Physionet using LIBSVM svmtrain, The code is as follows: model=svmtrain(labels,features_sparse,'-t 2 -s 0'); I have created features_sparse, but I ...

0 answers

Dynamically update self defined ticklabels in M>=2014b

on this question I received an answer on how to dynamically update the tick labels of plots using a callback function. Now, as of 'MATLAB 2014b' the matlab people decided to change things that have ...

15 30 50 per page
1 2 3