Answered
31x21x21 Matrix as volume plot
Please read: <https://www.mathworks.com/help/matlab/volume-visualization.html>, e.g.: * <https://www.mathworks.com/help/matlab/...

9 years ago | 0

| accepted

Answered
mex-file creation
The usage of function handles is limited, if you use the coder: * <https://www.mathworks.com/help/simulink/ug/function-handle...

9 years ago | 0

Answered
How do I get the deletedElems to form its own column array? I got newMatrixA, but deletedElems keeps getting an output of 2 instead of [ 1; 3; 2; 9; 7; ]
Wanted: deletedElems - deleted elements from input matrix returned as a column array function [ newMatrixA, deletedElems ] ...

9 years ago | 4

| accepted

Answered
Finding average of every nth row?
This is the mean over 6 subsequent rows: x = rand(9985, 1); S = numel(x); xx = reshape(x(1:S - mod(S, 6)), 6, []); y = su...

9 years ago | 5

| accepted

Answered
Please determine the value of the Matlab expression: 25>=(~4|5)||(5-3)
See <https://www.mathworks.com/help/matlab/matlab_prog/operator-precedence.html> >= has a higher precedence than |||| Then...

9 years ago | 0

Answered
Error making a buttongroup & radio buttons work.
The problem is here: switch (get(eventdata.NewValue,'Tag')) |eventdata.NewValue| does not have a property called 'Tag'. ...

9 years ago | 0

Answered
Substract nd array slices
Does your code perform this: dim = 3; A = rand(2,3,4,5); A = A(:, :, 2, :) - A(:, :, 1, :) ? Then: functi...

9 years ago | 2

| accepted

Answered
Create plot and pass some data
Perhaps: match = (0 <= GHIGHIclear && GHIGHIclear <= 2); GHIGHIclear = GHIGHIclear(match);

9 years ago | 0

Answered
dont match the result histogram equalization function with code
There could be many reasons. Unfortunately your code does not contain useful comments, such that the intention of the code must ...

9 years ago | 0

Answered
GUI error : Subscripted assignment dimension mismatch.
ERROR NOW IS THE FOLLOWING: SWITCH EXPRESSION MUST BE A SCALAR OR A CHARACTER VECTOR Again: Please post the *complete* err...

9 years ago | 0

Answered
Extract numbers from an integer
This sounds like a homework question. The solution is not hard and it should be possible to solve. Unfortunately you did not pos...

9 years ago | 1

Answered
Adjust figure position to a negative value
Under Windows see <https://www.mathworks.com/matlabcentral/fileexchange/31437-windowapi>

9 years ago | 0

Answered
I don't know about mistakes, help me please for my thesis. I am follow yours idea but i can't do that. How can I fixed in ode45?
Use the debugger to find the problem: Step through the code line by line. Actually |ntspan| is defined inside |ode45| some lines...

9 years ago | 0

| accepted

Answered
My interpolation works for one set, but does not work for the other
The message is clear: X and V must be of the same length. Set a breakpoint in the failing line and check the dimensions: ...

9 years ago | 2

| accepted

Answered
Trouble using the smooth function
According to the documentation, <https://www.mathworks.com/help/curvefit/smooth.html smooth> is a moving average filter. Then th...

9 years ago | 0

| accepted

Answered
Gradient plot as arrow - strange result
You do not get only 1 arrow, but they all start from the same point and have the same size and direction. Try: quiver(x, f,...

9 years ago | 1

| accepted

Answered
Showing the intersection points
A = [1 9]; B = [1 9]; n = 10; % Number of intermediate points AA = linspace(A(1), A(2), n); BB = linspace(B(1),...

9 years ago | 0

| accepted

Answered
How to draw 2 links robot
You cannot plot a formula. You need the numerical values of the trajectories for plotting. Have you seen this: * <http://w...

9 years ago | 1

Answered
P-Code incompatibility!
The P-code standard did not change between the Matlab versions 2013a and 2017b as far as I know. Are you sure that the incompati...

9 years ago | 0

| accepted

Answered
How to use just one output out of a function with several outputs in an equation?
You have to do this in two lines: [~, B] = f(x); Equation = 1 + x + B(x); Of course you could write a function, whi...

9 years ago | 0

Answered
Problems with backward compatibility
How can a software package not be backward compatible? The answer for this question is trivial: If the language changes, the...

9 years ago | 1

Answered
MATLAB Fundamentals course problem
Can anyone help me? Yes. Or no. It depends on what kind of help you want. The error message is clear already: It is trie...

9 years ago | 1

Answered
Find indices of repetitive values
With FEX: RunLength: [B, N, Index] = RunLength(sort(a)); repeated = B(N > 1) This is the list of values, which occur mor...

9 years ago | 0

| accepted

Answered
Problem in my for loop to find maximum y value
The code contains several problems: 1. |fullfile(Driftt)| does not do anything. Define the directory in addition: Folder...

9 years ago | 1

| accepted

Question


Documentation of Editor API
There is an API to interact with the files opened in the editor, see e.g. matlab.desktop.editor.getAll But how can I fin...

9 years ago | 1 answer | 1

1

answer

Answered
Sort row by descending error
According to the documentation of |sortrows| in R2016b, I see only numerical arrays, CHAR matrices and tables as input, but not ...

9 years ago | 0

Answered
How to sum up multiple matrices, element by element
If you really have a list of variables A1, A2, A3: This is a bad idea and impedes using the data. Prefer a multi-dimensional arr...

9 years ago | 3

| accepted

Answered
How to convert strings in a table to numbers?
A simplification of your code omitting unnecessary steps: for i=1:40 bk13.(i) = str2double(bk13{:,i}); end

9 years ago | 2

Answered
Any ideas how vectorise this?
At first a simplified version: function distances = calDistances(stocks, geneVector, dayN) defaultNoData = 100; dista...

9 years ago | 1

| accepted

Answered
How to sort strings by lenght?
A = ['adam ' 'bertil' 'cesar ' 'Ada ' 'berit ']; [~, Index] = sort(cellfun('length...

9 years ago | 0

Load more