Answered

Indexing a 3D matrix with a 2D matrix

units=sub2ind([G,N],units,repmat(1:N,G,1) ); L(:,units)=temp(:,:);

Indexing a 3D matrix with a 2D matrix

units=sub2ind([G,N],units,repmat(1:N,G,1) ); L(:,units)=temp(:,:);

más de 1 año ago | 0

Answered

Plotting exponential periodic function

What should you do? You should correct whatever mistake it is you made.

Plotting exponential periodic function

What should you do? You should correct whatever mistake it is you made.

más de 1 año ago | 0

Question

Make axis background transparent

Is there an alpha parameter that sets the transparency of a plot's background axis color? I would like to be able to export a pl...

casi 2 años ago | 1 answer | 1

Answered

accessing cell data using brace indexing,

You need to check what predictors really is. It is not a cell array, as you believe.

accessing cell data using brace indexing,

You need to check what predictors really is. It is not a cell array, as you believe.

más de 2 años ago | 0

Answered

Load mat files more efficiently than if, elseif statement

filename=fullfile('Documents/event_picks', "event"+events); S=load(filename); x1=S.x1; y1=S.y1;

Load mat files more efficiently than if, elseif statement

filename=fullfile('Documents/event_picks', "event"+events); S=load(filename); x1=S.x1; y1=S.y1;

más de 2 años ago | 0

| accepted

Answered

How to find min, max, and movmean for each page in multidimensional arrays

MIN=min(A,[],[1,2]); MAX=max(A,[],[1,2]); MOVMEAN=convn(A,ones(1,k)/k,'valid');

How to find min, max, and movmean for each page in multidimensional arrays

MIN=min(A,[],[1,2]); MAX=max(A,[],[1,2]); MOVMEAN=convn(A,ones(1,k)/k,'valid');

más de 2 años ago | 0

Answered

How can I use graph object info to find: areas, number of sides, and perimeter lengths of a each connected polygon within a network of polygons?

Your attachment doesn't contain a graph object. However, perhaps it will help to mention that if you have the vertices of a poly...

How can I use graph object info to find: areas, number of sides, and perimeter lengths of a each connected polygon within a network of polygons?

Your attachment doesn't contain a graph object. However, perhaps it will help to mention that if you have the vertices of a poly...

más de 2 años ago | 0

Answered

Could someone write some code to extract details within a for loop?

Something like this.... function stuff=getStuff(tgraph,arcNumber) AP=tgraph.ArcPoints; i=arcNumber; ...

Could someone write some code to extract details within a for loop?

Something like this.... function stuff=getStuff(tgraph,arcNumber) AP=tgraph.ArcPoints; i=arcNumber; ...

más de 2 años ago | 0

Question

Why is help() malfunctioning

Matlab seems to know that the help command is there, at least as far as which() is concerned >> which -all help C:\Program Fil...

más de 2 años ago | 2 answers | 0

Answered

Integrating a function including mvnpdf. Error: Input function must return 'double' or 'single' values. Found 'sym'.

Yes, that is the reason. Maybe you have made sigma or mu symbolic variables?

Integrating a function including mvnpdf. Error: Input function must return 'double' or 'single' values. Found 'sym'.

Yes, that is the reason. Maybe you have made sigma or mu symbolic variables?

más de 2 años ago | 0

Answered

Plotting two functions with ranges in one plot

You could also edit away the data points you don't want h=plot(x, M1, x, M2); ylim([-120,20]); h(1).XData(6:7)=[]; h(...

Plotting two functions with ranges in one plot

You could also edit away the data points you don't want h=plot(x, M1, x, M2); ylim([-120,20]); h(1).XData(6:7)=[]; h(...

más de 2 años ago | 0

Answered

Using relative tolerance with fmincon

Can you please update the document that stated that tolerances are absolute (it was posted by MATLAB staff)? No, we cannot. On...

Using relative tolerance with fmincon

Can you please update the document that stated that tolerances are absolute (it was posted by MATLAB staff)? No, we cannot. On...

más de 2 años ago | 0

Answered

Confusion matrix not being clearly visible for larger output classes

See the ConfusionMatrixChart Properties.

Confusion matrix not being clearly visible for larger output classes

See the ConfusionMatrixChart Properties.

más de 2 años ago | 0

Answered

Why do I keep getting the error message array indices must be positive integers or logical values?

Why do I keep getting the error message array indices must be positive integers Because the h in X(h) is non-integer and the 0 ...

Why do I keep getting the error message array indices must be positive integers or logical values?

Why do I keep getting the error message array indices must be positive integers Because the h in X(h) is non-integer and the 0 ...

más de 2 años ago | 0

Answered

optimization problem with two variable maxima and minima

fun=@(x) [2*x(1)^2+23.08*x(2)^2+4*(6+x(1))^2+24+14*(x(1)^2 +x(2)^2)^0.5+3*(x(1)^2+x(2)^2)-Y;... prod(x)-1]; x=fsol...

optimization problem with two variable maxima and minima

fun=@(x) [2*x(1)^2+23.08*x(2)^2+4*(6+x(1))^2+24+14*(x(1)^2 +x(2)^2)^0.5+3*(x(1)^2+x(2)^2)-Y;... prod(x)-1]; x=fsol...

más de 2 años ago | 0

Answered

matrix multiplication for "3-D" matrices

If you have the parallel computing toolbox, you can do this on the GPU with pagefun(@mtimes,A,B) but this may only provide gai...

matrix multiplication for "3-D" matrices

If you have the parallel computing toolbox, you can do this on the GPU with pagefun(@mtimes,A,B) but this may only provide gai...

más de 2 años ago | 0

Answered

how to have function with scalar value

"I have a code and 2 objective functions" If you really do want to treat this as a multi-objective problem, you should probably...

how to have function with scalar value

"I have a code and 2 objective functions" If you really do want to treat this as a multi-objective problem, you should probably...

más de 2 años ago | 0

Answered

Build new matrix from look up table

C=CD( interp1(B,1:numel(B),A,'nearest') );

Build new matrix from look up table

C=CD( interp1(B,1:numel(B),A,'nearest') );

más de 2 años ago | 1

| accepted

Answered

how to calculate area, perimeter and circularity of objects in an image using regionprops

Notice - >> a=1; %not displayed >> b=2, %displayed b = 2

how to calculate area, perimeter and circularity of objects in an image using regionprops

Notice - >> a=1; %not displayed >> b=2, %displayed b = 2

más de 2 años ago | 0

Answered

calculate std and mean for multiple variables automated

Observe - >> input=rand(10,5) input = 0.8147 0.1576 0.6557 0.7060 0.4387 0.9058 0.9706 0.0357...

calculate std and mean for multiple variables automated

Observe - >> input=rand(10,5) input = 0.8147 0.1576 0.6557 0.7060 0.4387 0.9058 0.9706 0.0357...

más de 2 años ago | 1

Answered

Accessing table variables in a class method

Here is an example to demonstrate that accessing tables by variable name works fine with value classes. Subclassing from 'handle...

Accessing table variables in a class method

Here is an example to demonstrate that accessing tables by variable name works fine with value classes. Subclassing from 'handle...

más de 2 años ago | 1

| accepted

Answered

How to curve fit an equation with sigma function

C = polyfit( sqrt( x.^2+y.^2) , Z, N)

How to curve fit an equation with sigma function

C = polyfit( sqrt( x.^2+y.^2) , Z, N)

casi 3 años ago | 1

Answered

How can i determine the area in percentage of a clustered image?

Divide the membership of each cluster by the total number of pixels.

How can i determine the area in percentage of a clustered image?

Divide the membership of each cluster by the total number of pixels.

casi 3 años ago | 0

Answered

Dimension of arrays being concatenated are not consistent.

Some things you urgently need to learn: https://www.mathworks.com/help/matlab/ref/dbstop.html https://www.mathworks.com/help/m...

Dimension of arrays being concatenated are not consistent.

Some things you urgently need to learn: https://www.mathworks.com/help/matlab/ref/dbstop.html https://www.mathworks.com/help/m...

casi 3 años ago | 1

Answered

Plotting points in style [x1,y1] , [x2,y2], [x3,y3] and them plot all of them?

No, but you can certainly write your own wrapper for any of the plotting functions to give you the input syntax that you want.

Plotting points in style [x1,y1] , [x2,y2], [x3,y3] and them plot all of them?

No, but you can certainly write your own wrapper for any of the plotting functions to give you the input syntax that you want.

casi 3 años ago | 0

Answered

Index exceeds array bounds

The only solution: https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html#responsive_offcanvas

Index exceeds array bounds

The only solution: https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html#responsive_offcanvas

casi 3 años ago | 0

| accepted

Answered

hi every one, i need to ask a question, thank you

A=double(A); A(logical(A))=B;

hi every one, i need to ask a question, thank you

A=double(A); A(logical(A))=B;

casi 3 años ago | 0

Question

Can symbolic vectors (not vectors of symbols) be defined and manipulated in the Symbolic Math Toolbox?

I would like to define symbolic functions that are functions of vector-valued quantities, like syms A x f(x)=x.'*A*x where A ...

casi 3 años ago | 1 answer | 0

Answered

Why does skeletonization sometimes reduce horizontal rectangles to single pixels?

Remember what bwskel is doing. It is peeling the outer pixels of the rectangles like an onion over and over again until it reach...

Why does skeletonization sometimes reduce horizontal rectangles to single pixels?

Remember what bwskel is doing. It is peeling the outer pixels of the rectangles like an onion over and over again until it reach...

casi 3 años ago | 0