Réponse apportée
monotone colored matrix with gridlines
Th showing a gray matrix is easy: I = 0.8*ones(10,10); imshow(I) But removing the axis but keeping the grid is not, b...

plus de 9 ans il y a | 0

Réponse apportée
Why is the factorial of 0 equal to 1?
"In mathematics, an empty product, or nullary product, is the result of multiplying no factors. It is by convention equal ...

plus de 9 ans il y a | 2

Réponse apportée
how to count number of repeating's in data series.
N(i) is the the number of occurrences of series of i numbers in A: N = zeros(numel(A), 1); i = 1; while(i) < numel(...

plus de 9 ans il y a | 0

Réponse apportée
Replace missing elements in an array with NaN
You can add the needed number of NaNs to the filterindex; filterindex(end+1:numel(scanindex) = NaN;

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
i am trying to replace one column with another in dataset?
Probably the size of your variables are not as descripted. Otherwise it works as expected: Load_DATA = rand(374, 14); Da...

plus de 9 ans il y a | 0

Réponse apportée
change even column values only
A = ones(20); A(:,mod(1:20, 2) == 0) = -1;

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
I'm writing a function where I've called the script AngleA and the function written below works fine to find AngleA but when I write a similar code for AngleB it says that AngleB isn't defined how do I define the variable or fix the error?
In file AngleA.m, write function A = AngleA(a,b,c) A = acosd((b^2 + c^2 - a^2)/(2*b*c)); in file AngleB.m write ...

plus de 9 ans il y a | 0

Réponse apportée
I am having trouble with "Index exceeds matrix dimensions"
If you have MaxColumns, and c runs from 1:MaxColumns, you try to get c + 1, which is MaxColumns + 1, so you get the error: ...

plus de 9 ans il y a | 0

Réponse apportée
Extract variable in nested for loop that otherwise gets replaced
p=rand(....) h=rand(....) HCPV=p.*h; for i = 1:100 for j = 1:29 cum_CO2inj(i,j) = function(p(i), ...

plus de 9 ans il y a | 0

Réponse apportée
Use of max iteratively on a cell
I think that a main problem is who to compute the max values. You can compute the max of each cell as follows: M = cellfu...

plus de 9 ans il y a | 0

Réponse apportée
Vectorisation of a simple for loop
A = [1 1 0 0 ; 1 1 1 0 ; 0 1 2 0; 1 0 0 1]; Q = cell2mat(arrayfun(@(i) A^i, 1:9, 'Uni', false)); Q = [zeros(1, 4); reshape(...

plus de 9 ans il y a | 2

| A accepté

Réponse apportée
How to rewrite matrix ‘Y’ as matrix ‘A’?
You can also use for-loops: for j = 1:size(Y, 1) for i = 1:size(Y,2) A(i+(j-1)*size(Y,2),(1:i)+sum(1:i-1)) = Y(j,1...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
how to save data from for loop in a matrix ??
for i=1:10; a(i)=i+5; end

plus de 9 ans il y a | 1

Réponse apportée
How to run matcont in Matlab 2015b in OS El Capitan (Macbook)?
Have a look at Ken Attwell's answer in <http://de.mathworks.com/matlabcentral/answers/243868-mex-can-t-find-compiler-after-x...

plus de 9 ans il y a | 0

Réponse apportée
macOS Sierra & Matlab 2013a
No. In fact, no Matlab version with non-United States regions and locales seems to be currently supported. I received the fol...

plus de 9 ans il y a | 0

Réponse apportée
deleting rows in a matrix?
new_x = x(unique(x2),:);

plus de 9 ans il y a | 0

Réponse apportée
how to draw a checkerboard with 9 squares each with 0.5 dimension?
You cannot create an image with pixels of dimension 0.5. The dimension of a pixel is always 1. Or what do you mean by 'with dim...

plus de 9 ans il y a | 0

Réponse apportée
Clear figure content using clf
If you have open a new figure, it is cleared anyway. So there is no difference between figure(); plot() and figure(...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
Want to plot a matrix as a 3D histogram or bar chart.
A = rand(9,10); % sample values bar3(A)

plus de 9 ans il y a | 0

Réponse apportée
Generate a vector X of 100 independent samples from Gaussian distribution
X = sqrt(3)*randn(100, 1) + 5;

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
How to declare a pointer to a pointer array?
Hm. I think it would be best to use genuine Matlab to solve your problem, instead of fiddling with pointers. I'd like to do that...

plus de 9 ans il y a | 0

Réponse apportée
How to alter the x axis?
Are you sure you mean 10e10 and not 1e10? Otherwise, setting the axes is quite straight forward: y = linspace(200, 10e10); ...

plus de 9 ans il y a | 0

Réponse apportée
Access variables in several .mat files
matfile = {'mymatfile1.mat', 'mymatfile2.mat', 'mymatfile3.mat', 'mymatfile4.mat'}; RW(16000,20,4) = 0; % preallocate f...

plus de 9 ans il y a | 1

Réponse apportée
Save values in a loop in a vector
I found it a bit hard to understand what your are looking for. As far as I understood, this can solve your problem: p = [1...

plus de 9 ans il y a | 0

Réponse apportée
Comparing two matrices and obtain the un-repeated rows ?
A(~ismember(A, B, 'rows'), :)

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
recursion-Arkermann function- code run but have wrong answer
You use a wrong definition of the Ackermann function. Must read: A(m − 1, 1) if m > 0 and n = 0(!!!);

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Hello I am having trouble plotting this convolution. my error is "Vectors must be the same length."
Use conv for convolution. cov computes the covariance matrix.

plus de 9 ans il y a | 1

Réponse apportée
how do I delete pre-existing jobs in parpool from remote cluster
Have you tried to exit Matlab and start over?

plus de 9 ans il y a | 0

Réponse apportée
confusion matrix in matlab
The ROC framework is for binary classification tasks. And you need a continuous valued output of the classifier, corresponding t...

plus de 9 ans il y a | 0

Réponse apportée
rewrite my loop - whats wrong with that loop ?
I think you can rewrite your code as follows: if dir1 == 1 addr = ADDR1; val = 1; else addr = N_SM - ADDR1; v...

plus de 9 ans il y a | 0

| A accepté

Charger plus