Réponse apportée
Problem with Create Matrix
Because Error using vertcat CAT arguments dimensions are not consistent. You have 10 numbers in the first row, and try...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Array of Struct: Index exceeds matrix dimensions
Maybe you defined datevec as a variable? Please check using which datevec And does s always contain 106 elements? To mak...

plus de 10 ans il y a | 1

Réponse apportée
Store the structure fields generated in a for loop into a vector
Use a cell array: RPM{i} = ord.rpm;

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How many neurons in the hidden layer???
There are only rules of thumb on how to do this, I think. http://stackoverflow.com/questions/3345079/estimating-the-number...

plus de 10 ans il y a | 0

Réponse apportée
Programming course - question help
Define your function with an output argument function s = generationXYZ(n) and assign this in your function if 0 <=...

plus de 10 ans il y a | 0

Réponse apportée
How do I pass the output of a command as argument to the other command?
You have to use eval: eval(['size(' sprintf('%s%d','elem_append_mod',6) ', 2)' ]) BTW: If you use a fixed constant like ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Writing secret codes?
Let's work it out first for a single letter. The base idea of this encryption is to just add a constant offset, the 'key' to ...

plus de 10 ans il y a | 0

Réponse apportée
Importing text to cell, avoid conversion to scientific notation
You can use dlmread for this task.

plus de 10 ans il y a | 0

Réponse apportée
Comparing more than two columns of a matrix using '<' or '>' symbol
A = [2 5 4 4 1 2 6 0 1 7 5 8]; pairs = nchoosek(1:size(A,2), 2) X = cell...

plus de 10 ans il y a | 0

Réponse apportée
How do I define a variable I just made with an IF statement?
It's a typo in the 4th line, remove the > and use x2 = x1.*2 Note that if x1 is not <= 0, it must be > 0 , so you there ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Find Diverging point of two arrays
I loaded your data and found that if y is the data of the higher curve, you can find the diverging point using dp = find([...

plus de 10 ans il y a | 0

Réponse apportée
Imaginary part of a function while real part is positive
F = log(Z.^0.5); contour(imag(F).*(real(F)>0))

plus de 10 ans il y a | 0

Réponse apportée
Shuffling elements within the rows of a matrix
To achieve the last step in your code, use sub2ind: B = A(sub2ind([nr nc], ri, col_indx_mtrx));

plus de 10 ans il y a | 1

Réponse apportée
How to count after how many iterations my program reached min/max of unimodal function
You have to change the while expression, because a will never become exactly 0.846 while abs(a - 0.846) > 1e-3 and use p...

plus de 10 ans il y a | 0

Réponse apportée
Can't find MEXOPTS.BAT file
It is located in [matlabroot filesep 'bin'] Note that it is called mexopts.sh on MacOS and Linux.

plus de 10 ans il y a | 0

Réponse apportée
I need to normalize a vector size 82x1
x = randn(82,1); x = (x - min(x))/(max(x)-min(x));

plus de 10 ans il y a | 0

Réponse apportée
How can I make a flat,horizontal line appear in Matlab when my values are less than zero?
function h = height(t) h = ((-9.8).*(2.^(-1))).*(t (:) .^2) + 125.*t(:) + 500; h(h<0) = 0; end

plus de 10 ans il y a | 1

Réponse apportée
Changing switch statement to while loop?
You can use the menu in the while loop as follows: while menu('Information Correct?','Yes','No') == 2 wrong = menu('Wha...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Creating character codes from text file
Set up code table X chars = ['A':'Z' 'a':'z']; for i = 1:numel(chars) X{chars(i)} = sprintf('c%02d', i); end d...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Plotting two different data sets on one graph
The range of the first graph is 0 to about 900, and 674.981 to 674.982 for the second graph. So the second graph would be a hori...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
ca someone please help me with this . i get not enough input argument.
You have to call the function with two arguments. y = rand(500,1); A = rand(500, 500); f(y, A); Note that it would be...

plus de 10 ans il y a | 0

Réponse apportée
How can I crop an object in an image without actually knowing where in the image the object is located?
I = imread('ButtsB.jpg'); Convert to binary (for example, using R layer of image and threshold 100): B = I(:,:,1) > 10...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Add multiple images from one tiff file to one image
Outside the loop, set E = []; In the loop, use D = E + im2double(imread(fname, 'Index', k)); Note that you cannot...

plus de 10 ans il y a | 1

Réponse apportée
Apply a skew normal distribution to a normal distribution
gaussian = @(x) (1/sqrt((2*pi))*exp(-x.^2/2)) skewedgaussian = @(x,alpha) 2*gaussian(x).*normcdf(alpha*x) plot(x, gaussi...

plus de 10 ans il y a | 13

| A accepté

Réponse apportée
How to calculate the inter-band average image.
If you have your RGB image in a MxNx3 matrix, you can use I = im2double(imread('peppers.png')); % sample image % make s...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
how to plot by looping
The points are not visible because plot(xa6(s6),ya6(s6),'-'); just plots a single point that falls on the axis or the grid lines...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
error: not enough input arguments
You have to call the function with an argument, like satur(23)

plus de 10 ans il y a | 0

Réponse apportée
Subscript indices must either be real positive integers or logicals.
for f=1:0.2:20; and in the loop p(f) = , so you try to eval p(0.2) = ... which is not allowed. f=0.2 is used as a subscript inde...

plus de 10 ans il y a | 0

Réponse apportée
Find row and collumnumber in matrix.
This finds cells that contain a 1, maybe amongst other numbers: find(cell2mat(cellfun(@(x) (any(x==1)), C, 'UniformOutput', ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How to replace elements in a vector?
First determine the indices of the 2's and 3's, then replace them: idx2 = v == 2; idx3 = v == 3; v(idx2) = 3; v(idx3) ...

plus de 10 ans il y a | 0

Charger plus