Answered
Find all values within a given tolerance of 0
Ignoring the _0.01% of 0_ and assuming you want the location of elements whose absolute value is less than 0.01, simply: [ro...

7 years ago | 0

| accepted

Answered
Replacement of groups of neighbor numbers giving priority to a row-wise check
Use the same method as in your <https://uk.mathworks.com/matlabcentral/answers/426895-replace-groups-of-numbers-in-a-matrix-chec...

7 years ago | 0

| accepted

Answered
Is it possible to vectorize this?
First, note that you should never use |length| on a matrix. You're using |length| as synonymous to the number of rows but if |A|...

7 years ago | 0

Answered
How to delete a column with a specific value
_Error in reactionforce_script (line 16)_ reactionforce(reactionforce(2:end,:) < thresholdmin | reactionforce(2:end,:) > th...

7 years ago | 1

| accepted

Answered
How can I change the input method by using xlsread and convert the code?
Alternatively, rather than trying to fix code that has no comments explaining what is going on and poor variable names, you coul...

7 years ago | 1

Answered
How to match elements of matrix having different dimensions?
_find the row index of A where elements of B are found_ |ismember| is indeed the function for that, so you will have to expla...

7 years ago | 1

| accepted

Answered
How to use trifbank() in MATLAB 2018b?
The only reference to |trifbank| I can find is this <https://uk.mathworks.com/matlabcentral/fileexchange/31755-triangular-filter...

8 years ago | 0

Answered
MATLAB OOP: Return value from constructor not possible
_However MATLAB constructor is not allowed to return anything other than the object._ I have not encountered any programming ...

8 years ago | 0

Answered
How to subset in matrix based on the first 3 columns?
If I understood correctly: A=[ 1 2 3 2 3 4; 1 2 3 3 2 4; 1 2 3 2 3 4; 2 3 4 1 2 3; 2 3 4 2 3 4; 1 ...

8 years ago | 0

| accepted

Answered
Change variable when another changed
Without using <https://www.mathworks.com/help/matlab/object-oriented-design-with-matlab.html OOP>, this is not possible. You wil...

8 years ago | 0

| accepted

Answered
select y data with duration x data
To calculate the mean of |y| over each interval of 5 duration: accumarray(ceil(cumsum(x')/5), y', [], @mean) To group th...

8 years ago | 0

Answered
Sum through an array until a value is reached, then continue
sumx = cumsum(x); meanybelowthreshold = mean(y(sumx <= 0.1)); meanyabovethreshold = mean(y(sumx > 0.1));

8 years ago | 0

Answered
Extracting sub cell arrays from a cell array
vertcat(yourcellarray{:}) which will fail if any of the subcell arrays does not have the same number of columns as any of t...

8 years ago | 1

| accepted

Answered
i have an data with different columns . how to make columns in all the rows equal and remaining elements as 0. no of rows is 13 and max elements in a row is 23 and minimum elements is 17.
As has been said the matrix B = [5 2 3 9; 4 5 ]; cannot be created in matlab. So your data can't possibly be st...

8 years ago | 0

Answered
How can I use a string of names for a string of images?
I've not looked at your code in great details but already I can see a few things that don't look right: I have no idea what y...

8 years ago | 1

| accepted

Answered
Map a function over specific dimensions of matrix
You would have to modify your function |F| like this to achieve what I think you want: function fct = F(Ai) ...

8 years ago | 1

| accepted

Answered
How can I write the Twos complement and return a hex string ?
Function to add hexadecimal strings of arbitrary length: function hexsum = addhex(hex1, hex2) assert(all(ismember(hex...

8 years ago | 1

Answered
What is the easiest way to embed a text data file into a .m function so that you don't need two files.
Load your text file into a variable, however you normally read it in your code, for example: lookuptable = fileread(yourtex...

8 years ago | 1

| accepted

Answered
Convert cell to string
So what is that conversion from cell array to string supposed to do? What do you want as an output? Assuming it's a 1xN strin...

8 years ago | 0

| accepted

Answered
Avoid rounding off the decimal values,while loading the data from textfile
_I observed that, data in the columns has been rounded off to first 4 digits only_ How did you observed that? Note that th...

8 years ago | 1

| accepted

Answered
make cd() work more efficiently or a better function to do what I am looking for
The most efficient way to make |cd()| more efficient is to not use |cd()| at all. There is never any need to use |cd()| in matla...

8 years ago | 1

Answered
Output as an vector
If the signature of the function you've asked to implement is |[Approximation,RelativeError] = Algorithm(x,n)| then grader will ...

8 years ago | 0

| accepted

Answered
Hello, I didn't get the following code:
This is all simple indexing which I thought was well explained in the <https://www.mathworks.com/help/matlab/math/array-indexing...

8 years ago | 0

| accepted

Answered
Multi-Column Ordering of Matrices in Different Orders
Use <https://www.mathworks.com/help/matlab/ref/sortrows.html |sortrows|>: [newA, ordering] = sortrows(A, [1 -2]) to get ...

8 years ago | 0

| accepted

Answered
How do i set limits on the graph scale similar to colormap
You can set the colour map limit with <https://www.mathworks.com/help/matlab/ref/caxis.html |caxis|> or by changing the <https:/...

8 years ago | 1

Answered
how to make Array variable type as vbscript Array in order to transfer to a Adobe Illustrator Application?
It looks like |SetEntirePath| expects a 1D array of 1D arrays. In theory that would be a cell array of vectors in matlab, so: ...

8 years ago | 0

Answered
How to compare the rows of small file with rows of large cell?
I am certain we've answered similar questions from you in the past. By now, you should also know that pictures are useless for u...

8 years ago | 2

Answered
i have a csv file which last column is class data which i add 'w' character in last column of each cell,what will do?
One simple way: filecontent = fileread('writer130test.csv'); %read whole file at once newcontent = regexprep(fileconten...

8 years ago | 0

Answered
movie2avi has been removed
The code you're showing is obviously meant to be in a loop which you haven't showned. That makes it harder to pinpoint the cause...

8 years ago | 2

| accepted

Load more