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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 1

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 0

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

Respondida
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));

más de 7 años hace | 0

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 1

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 1

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

Respondida
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:/...

más de 7 años hace | 1

Respondida
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: ...

más de 7 años hace | 0

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

más de 7 años hace | 2

Respondida
Hi, I am wondering if the following binary number is correct for a 64-bit computer: 1011110001.0010011100101011000000100000110010000000000 or should there be 52 bits after the radix point? In my case I have 43 bits after the radix point. Thank you
I believe I've already given you a simple piece of code to convert any number to its IEEE754 double precision representation. ...

más de 7 años hace | 0

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

más de 7 años hace | 0

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

más de 7 años hace | 2

| aceptada

Cargar más