Beantwortet
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...

mehr als 11 Jahre vor | 0

Beantwortet
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 ...

mehr als 11 Jahre vor | 0

Beantwortet
code to do iterations on matlab
p1=400 p2=300 p3=150 for i=1:9 % place your code here end

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
calculate an equation with index
x = 0:N-1; kon = sum(x.^2);

mehr als 11 Jahre vor | 0

Beantwortet
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.

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

Beantwortet
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.

mehr als 11 Jahre vor | 0

Beantwortet
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(:));

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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....

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Accelerometer used upside down
data = -data;

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
how can i save the output of the loop
filename = sprintf('file%d', i); save(filename)

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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)-...

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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))))

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 11 Jahre vor | 0

Beantwortet
How to display data after one iteration step
Put a figure command and the command to show your image into your for loop.

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

Beantwortet
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_' ...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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; ...

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

Beantwortet
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...

mehr als 11 Jahre vor | 0

Beantwortet
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...

mehr als 11 Jahre vor | 10

| akzeptiert

Beantwortet
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 ...

mehr als 11 Jahre vor | 0

Beantwortet
How to process min and max data on a graph
Have a look at function errorbar

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 2

| akzeptiert

Mehr laden