Réponse apportée
plot 2 curves with 'very close' y values
If you want to see the differences and at the same time keep values of your vectors, i would recommend something like this: ...

environ 13 ans il y a | 0

Réponse apportée
How to count the amount of cells?
your_count = cellfun(@(x) numel(x),your_cell_array);

environ 13 ans il y a | 4

| A accepté

Réponse apportée
How can I get MATLAB to leave a loop when any key is pressed?
This is a bit of a hack, and will probably slow down your code. The idea is to create a figure, and check whether a key has been...

environ 13 ans il y a | 1

Réponse apportée
how to delete repated rows with out re order them
[~,idx]=unique(cell2mat(levelx),'rows','first'); unique_levelx = levelx(sort(idx),:);

environ 13 ans il y a | 1

| A accepté

Réponse apportée
how to convert a vector to a number
a = randi(9,1,5); your_num = sscanf(sprintf('%d',a),'%d'); or alt_sol = sum(a.*repmat(10,1,numel(a)).^(numel(a)-1:-1:...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
How can I plot two vectors using the plotyy command, and after that plot two points with different y-scales on the same graph?
[AX,H1,H2] = plotyy(Va,la,Va,Pa); %handles to the axes will be in AX plot(AX(1),Va(mpp), Ia(mpp),'bo'); plot(AX(2),Va(mpp),...

environ 13 ans il y a | 0

Réponse apportée
How to correct the assignment Error?
Try img_hist(i)= sum(sum(sum(im==(i-1)))); _im_ might be a three dimensional matrix.

environ 13 ans il y a | 1

| A accepté

Réponse apportée
problem with manipulation a vector randomly
You could still use bsxfun, but instead of creating a vector of random numbers, if I understood correctly, you might need to cr...

plus de 13 ans il y a | 0

Réponse apportée
How to calculate the mean for specific rows in a cell using cellfun
It is not really clear how you want to split your data, so I added two variables, rowsFromStart and rowsFromEnd so you can speci...

plus de 13 ans il y a | 0

Réponse apportée
Problem in generation of random number
This will do what you ask, both row and column wise. It is not the most efficient thing out there, but at least it should give y...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Complex numbers in matlab
To look how numbers are stored in .mat files you could look at the .mat file <http://www.mathworks.com/help/pdf_doc/matlab/matfi...

plus de 13 ans il y a | 0

Réponse apportée
What is the code?
doc gamrnd The skewness is a function of one of the two parameters of the distribution, that you can set as you see fit. You...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Compiling C++ file to *.mex64 leads to "unresolved external symbol" (conversion from size_t to int most likely the reason"
From your error message, the program not working has nothing to do with the conversion from size_t to int. That in itself might ...

plus de 13 ans il y a | 0

Réponse apportée
data generation using bootstrap method
Bootstrapping consists in selecting a subset of the data. That sounds like a job for _randperm()_ a = randi(60,1,50); subs...

plus de 13 ans il y a | 0

Réponse apportée
Getting the algorithm behind the pos routine in matlab?
I will guess that you are talking about _symrcm()_. It is a built-in Matlab function. Here is what the documentation says: Th...

plus de 13 ans il y a | 0

Réponse apportée
Arrange a matrix with repeated rows
[idx idx] = sortrows(sort(a,2)); a = a(idx,:);

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
How to reverse a number
A vectorized, faster alternative For integers: your_answer = flipud(sscanf(fliplr(sprintf('%d ',a)),'%d ')); And float...

plus de 13 ans il y a | 0

Réponse apportée
Matrix and vector multiplication elementwise
bsxfun(@times,a,h)

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Rolling max/min maximum and minimum
Without a toolbox: x = randi(10,1,100); n = 2; maxVec = arrayfun(@(a,b) max(x(a:b)),1:numel(x)-n+1,n:numel(x));

plus de 13 ans il y a | 0

Réponse apportée
License error or the function?
It looks like you are using a license server, and that all the licenses for the statistics toolbox are in use ( _ecdf()_ is a fu...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
reshape a matrix in a special manner
Faster: a = rand(100,130); [m n] = size(a); a = reshape(a,m,10,n/10); %Provided n is divisible by 10 your_mat = squeez...

plus de 13 ans il y a | 0

Réponse apportée
Can anyone explain this output?
It's just because of the way the data is formatted for display. doc format Set the same format in the two machines if you...

plus de 13 ans il y a | 1

Réponse apportée
Can we remove a bar from histogram which drawn using 'hist' function?
idx = your_data ~=0; You can now calculate the mean and standard deviation: your_mean = mean(data(idx)); your_std = me...

plus de 13 ans il y a | 1

Réponse apportée
How to extend the matrix size by splitting up a column in two columns
A= [10 2 0.0 6;... 10 2 18.0 6;... 10 2 1800.0 6;... 10 2 1810.0 6;... 10 2 2215.0 6]; Str = m...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
NaN and Infs popping in my matrices after a few iterations of EM algorithm
It sounds like you are running into numerical stability issues. Look at the following example, that might help you understand wh...

plus de 13 ans il y a | 0

Réponse apportée
Sorting variable names in alphabetical order
Looks like you might want to use _orderfields()_ a.b = 1; a.a = 2; a.m = 4; a.h = 5 a = b: 1 a: 2 ...

plus de 13 ans il y a | 4

| A accepté

Réponse apportée
find number of columns on text file
delimiter = ' '; %or whatever fid = fopen('myFile.txt','rt'); tLines = fgets(fid); numCols = numel(strfind(tLines,delimit...

plus de 13 ans il y a | 7

| A accepté

Réponse apportée
Using datenum on a cell array with different date formats
myDates = {'31.12.2009 23:58:31'; '25.12.2009'; '15.12.2009 15:18:10'}; idx = cellfun(@(x) isempty(regexp(x,':')),myDates); ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
How can I make use of multiple cores in Matlab linear algebra
To give you a clear answer, it would be necessary to look at the source code, know what compiler the Mathworks used, what compil...

plus de 13 ans il y a | 0

Réponse apportée
Generating C/C+ code for the Optimization bintprog function
It is not supported, so there really is no solution, short of asking the Mathworks to support it. You could write it yourself, b...

plus de 13 ans il y a | 0

| A accepté

Charger plus