Answered
Plot text (x axis) vs. y axis (numbers)
Why don't you convert x to a number? % mock data hrs = arrayfun(@(n) [num2str(n) 'H'], 0:23, 'UniformOutput', false); hrs(1:1...

10 månader ago | 0

Answered
Indexing a matrix that's not in the workspace
you can write a utility function to do that function value = debugPrint(a, i) value = a(i); end %% or using an anonymo...

10 månader ago | 0

| accepted

Answered
How do I unstack/transpose table in Matlab?
unstack groups using a third column, but you can trick it to do what you want by adding a fake third column id={'id1';'id1';'id...

10 månader ago | 1

| accepted

Answered
GUI gives error after moving to a different computer
Another possible workaround would be to create a stub of this function Unfortunately this function is not a builtin, so builtin...

10 månader ago | 1

Answered
How to write elements of a nested cell array to an excel?
The problem starts with the different sizes of each rpw which makes it more complecated to unravel the nested cell arrays c...

10 månader ago | 0

Answered
How to remove numbers that only show up once in a list of recurring numbers
x = [1,1,1,1,2,3,3,3,3,4,5,5,5,5,6,7,7,7,7,7,7,8,53,54,54,54,54,54]; numbers = 1:max(x); numx = accumarray(x(:), 1); atLeast2...

10 månader ago | 0

Answered
How to run an App every 2 hours
Use a <https://www.mathworks.com/help/matlab/matlab_prog/use-a-matlab-timer-object.html timer>

10 månader ago | 0

Answered
How to replace missing values in a cell array?
x = {missing(), 1, 2, 3, missing(), missing(), 5}; mask = cellfun(@ismissing, x); x(mask) = {[]}; % or whatever value yo...

10 månader ago | 1

| accepted

Answered
Interpolating random values to smoothen a curve
you can implement the stavisky golay filter basically the idea is to iterate through the data and on each point perform a polyn...

10 månader ago | 1

| accepted

Answered
Scatter Plot with string in x-axis and integer on y-axis
Maybe bar chart would be better for you, but if you must use scatter plot scatter(1:5,percentage); set(gca, 'XTick', 1:5...

10 månader ago | 0

Answered
how to add lable into rows
You need to use an inner join t3 = join(otherTable,goods,'key','keyColumnName') Or if the key column name is different i...

10 månader ago | 0

| accepted

Answered
Putting the result from eval into a cell array
please please please don't use eval to access varriable names eval is not built for that, however, for some reason the first th...

10 månader ago | 0

Answered
how to replace the elements row by rows instead of column by column in matrix
find(A==3,1,'first') find(A==3,1,'last') These lines find linear indices not [row, col] subsets. Linear indices go alon...

10 månader ago | 0

| accepted

Answered
MATLAB HELP ME PLS
The trapezoidal integration method is a numeric calculation which approximates the area trapped between the curve and the x axis...

10 månader ago | 0

Answered
How to access a function under a given path?
A possible solution would be to make every git branch a package. You will have to make all subfolders packages as well, but that...

10 månader ago | 0

| accepted

Answered
how to convert the fraction part into intger?
What about K = round(mod((abs (L)-floor (abs (L))) *10e8 , 256)) Or K = floor(mod((abs (L)-floor (abs (L))) *10e8 ...

11 månader ago | 0

Answered
For loop with subs
You are setting a 2x3 matrix into l2, which duplicates mat for all possible substitutions 2x3 times 2x3 = 4x9

11 månader ago | 0

Submitted


zoomginput
Zoom in/out of plot with your mouse wheel while using ginput

11 månader ago | 0 downloads |

Question


How to change property behavior for a mocked object
I'm trying to use the mocking framework for unit tests I'm trying to make the property of a mock object return another mock obj...

11 månader ago | 1 answer | 0

1

answer

Answered
How to know dimensions to give in trapz function
let's say you have a column vector x and you calculate y according to y = ax^2 now if a is a vector, you will get a matrix y: ...

11 månader ago | 0

Answered
Adding dropdown option from GUI in App Designer
I would put the options in a text file. Then load it during startup

11 månader ago | 0

| accepted

Answered
How to plot plot from differnet location in a single figure?
If i understand your question corectly, and you have several .mat files each one with a varriable T and a varriable output, you...

11 månader ago | 0

Answered
Rearrange any matrix Randomly with a specific sequence
A=1:20; blockSize = 5; nOutputBlocks = 2; a=reshape(A,blockSize,[]); i=sort(reshape(randperm(size(a,2)),[],nOutput...

11 månader ago | 0

Answered
How to transfer data between apps using app designer
The simplest solution would be to couple the two apps. When you open app B send the object of app A to it. Then when app B upd...

12 månader ago | 0

Answered
Moving NaN elements from the last columns to the first column, iteratively
The simplest way would be to loop through the rows: i = isnan(A); for j = 1:size(A,1) A(j,:) = [A(j,i(j,:)) A(j,~i...

12 månader ago | 1

| accepted

Answered
Replace the elements of a matrix
B = reshape(A',numel(A),1)

12 månader ago | 0

Answered
Save char array from for loop into a matrix
Unless you can guarantee that all file names have the exact same length, you need to use something other than a char matrix. E...

12 månader ago | 0

| accepted

Answered
What frustrates you about MATLAB?
The implementation of properties. They are class fields, and they are the accessor methods to these fields, (get/set). This dual...

12 månader ago | 0

Answered
Could anyone help me how to randomly display the values in the selected places
if you meant to fetch values from a random index using above mentioned linear indices: a = magic(5); a = a(1:3,:); validInd...

12 månader ago | 0

Answered
How to convert a cell array containing various inline functions to a unique inline function?
You can generate a function handle which will execute all the handles in a cell array using closures: a = magic(3); myFunction...

12 månader ago | 0

Load more