Réponse apportée
User input bar graph
If you store your budget for each year you just need a single call of bar years = input('How many years? '); for curyear...

plus de 11 ans il y a | 0

Réponse apportée
Split cell array taking into account difference between elements
This is somewhat similar to Star Strider's solution but with an extra index ind_new to get rid of the subarrays and with a copy ...

plus de 11 ans il y a | 0

Réponse apportée
code to do iterations on matlab
p1=400 p2=300 p3=150 for i=1:9 % place your code here end

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Errorbar: Thicker line but same error bar width
Just plot a thicker line on top: hold on plot(x, jobsInSystem, '-k.', 'LineWidth', 2)

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
calculate an equation with index
x = 0:N-1; kon = sum(x.^2);

plus de 11 ans il y a | 0

Réponse apportée
textscan: skipping rows with missing data
I think that you have to read individual lines with fgets and then deal with the cases of missing values.

plus de 11 ans il y a | 0

Réponse apportée
Help with building an Iteration function
You have to call your function with one input, e.g. iteration(20)

plus de 11 ans il y a | 0

Réponse apportée
How can I get the (approximate) eigenvectors of a huge matrix?
If M contains many 0's you can define M as a sparse matrix to speed up computation.

plus de 11 ans il y a | 0

Réponse apportée
Function: var,mean,std how to use on the matrix?
Use : to convert your matrix to a vector and then use mean, var, etc: m = mean(V(:));

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Help generating plot of Zakharov's function
x = -5:0.1:5; y = x; for i = 1:numel(x), for j=1:numel(y), Z(j,i) = zakh([x(i) y(j)]); end; end [X Y] = meshgrid(x, y); s...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
minboundcircle stuck in infinate loop of a particular dataset
I cannot replicate your error but get minboundcircle(X89,Y89) ans = 471.8077 261.8077

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
how to convert RGB to YIQ color space ?
Hi Namita, there is a function on File Exchange that does a lot of color conversions that might be useful for you http://www....

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Accelerometer used upside down
data = -data;

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Choose data and plot from a 3x5 Matrix
Database is not a 3 x 5 matrix but a cell array with 3 x 5 elements. So your ii should probably run like this: for ii = 1:nu...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
how can i save the output of the loop
filename = sprintf('file%d', i); save(filename)

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Simpler way without for loops
sz = size(Mat_A_3D); ind = sub2ind(sz(1:2), idx(:,1), idx(:, 2)); offset = repmat(cumsum(repmat(prod(sz(1:2)), [1 sz(3)-...

plus de 11 ans il y a | 0

Réponse apportée
how to convert RGB to YUV ?
http://www.mathworks.com/matlabcentral/fileexchange/20033-firewire-vision-tools/content/web_CMU1394_VisionTools/_bin/rgb2yuv.m ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Find the higher frequency for nearest value in column
[X1 X2] = meshgrid(x, x'); D = sqrt((X1 - X2).^2); x_closedtoall = X1(1, find(sum(D) == min(sum(D))))

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
In an assignment A(I) = B, the number of elements in B and I must be the same.
Your function f returns a 2x1 column vector that cannot be assigned to a scalar mol_frac(i); instead, use mol_frac(:,i)= fso...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Percentage from two text file and send to axes in GUI.
Read the text files. Make sure you have the right names (you provide files test2.txt and test3.txt but use different files testa...

plus de 11 ans il y a | 0

Réponse apportée
How to display data after one iteration step
Put a figure command and the command to show your image into your for loop.

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
image intensity scale sub-divide into two ranges
h1 = hist(I(I<=127), 0:127); h2 = hist(I(I>=128), 128:255);

plus de 11 ans il y a | 0

Réponse apportée
What is the correct syntax for num2str
set = [0.4 0.204 0.242]; manoev = 1:5; for i = 1:numel(set) for j = 1:numel(manoev) filename = ['Dataset_' ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
regroupe the results in a matrix
Ok, here is my 2nd solution. There's also a faster way to compute f, I think: f = 1 - (mod(sum(A'), 2) == 1); x = 0:7; ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
regroupe the results in a matrix
x = f(:,2); x(logical(f(:,1))) ans = 0 3 5 6 x(~logical(f(:,1))) a...

plus de 11 ans il y a | 0

Réponse apportée
How to parse information between two strings using regular expressions?
help regexp There it says Characters that are not special metacharacters are all treated literally in a match. To ma...

plus de 11 ans il y a | 0

Réponse apportée
How to do a boxplot for three samples of different sizes?
x1 = randn(600,1); x2 = randn(1440,1); x3 = randn(500, 1); x = [x1; x2; x3]; g = [zeros(length(x1), 1); ones(lengt...

plus de 11 ans il y a | 10

| A accepté

Réponse apportée
Parfor variable slicing and assignment
Probably Matlab simply is not smart enough to figure out that in your particular example the size of A is fixed. Without having ...

plus de 11 ans il y a | 0

Réponse apportée
How to process min and max data on a graph
Have a look at function errorbar

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
estimation/measure of entropy
Make sure you run log2 only on values > 0. Otherwise you would get NaN. I = im2double(rgb2gray(imread('peppers.png'))); ...

plus de 11 ans il y a | 2

| A accepté

Charger plus