Answered
Need help with creating a function of three parameters
You're close. Just put the formulaes inside of the function, and return the outputs of interest. Something like the code shown b...

16 dagen ago | 1

| accepted

Answered
Storing of output in a for loop
A=xlsread('Values.xlsx','Sheet1','A2:A3204'); count=0; % assign x x = 0:50:7500; % preallocate vector to hold counts numC...

16 dagen ago | 0

Answered
Creating a logic vector out of 2D matrix
%M matrix M = [1 2; 2 0; 3 1; 4 0; 5 3; 6 0; 7 2; 8 4; 9 0; 10 1]; % logic vector...

21 dagen ago | 0

Answered
Color each boxplot differently
I think this should get you closer to what you want. You can select other colors using their rgb color codes, I just used red,gr...

22 dagen ago | 0

Answered
Repeating for loop N times
You need to use a nested for loop, so something like this, where I have assumed that H,D,K,J are length, numLoops vectors. You c...

26 dagen ago | 0

Answered
How do I resolve these two lines separately?
It looks like you may have already answered your own question, but I think this is a little cleaner approach to do the same thin...

27 dagen ago | 1

Answered
How do I make a vector of doubles continuous?
use interp1 so for example if you wanted "continuous" values at 1.2, 2.8, and 3.7, 33.5 xq = [1.2,2.8,3.7,33.5]; % query point...

27 dagen ago | 0

| accepted

Answered
Call MATLAB function in appdesigner
It looks like your function just creates a variable called robotMTH and doesn't use anything in the app object to do its calcula...

27 dagen ago | 0

Answered
Setting elements of an array to be zero based on the values of a vector
I think you want to look at every possible pair of indices that could be made out of the elements of b and set those elements of...

28 dagen ago | 0

Answered
Find all y values for single x in polyshape plot
You can use the intersect function for this, for example pgon = polyshape([0 0 1 1],[1 0 0 1]) endpoints = intersect(pgon,[0.2...

28 dagen ago | 1

| accepted

Answered
How to count active faults in a specific time interval
Here is another approach (uses repelem trick from @Jan https://www.mathworks.com/matlabcentral/answers/382011-how-to-count-the-n...

28 dagen ago | 0

Answered
Removing multiple columns from a matrix
I think this will do what you want for k = 1:numel(b) a(k,:) = [a(k,b(k)+1:end),zeros(1,b(k))] end

29 dagen ago | 0

| accepted

Answered
How to run a Matlab script asynchronously from a Matlab app?
One way would be to use a MATLAB timer and make your script that you want to execute asynchonously be the timer's callback funct...

30 dagen ago | 0

| accepted

Answered
How to use a saved figure in an existing plot?
I think this may get you what you want https://www.mathworks.com/matlabcentral/answers/3901-merging-two-figures

2 maanden ago | 0

Answered
How to extract table data based on column values?
Could be you should be using strcmp rather than == to compare the strings It's a little hard to know exactly how you have the d...

2 maanden ago | 0

Answered
How to generate Pattern in MATLAB
For the first plot you show, you could do something like this (you can adjust the exact scaling) x=linspace(0,0.1) xr = 0.1/3 ...

2 maanden ago | 0

Answered
Cant change directory between loops
Looking at your loops the logic seems basically OK but I can't run it to see exactly what happens as I don't have your image dir...

2 maanden ago | 0

Answered
Extracting unique rows from cell array Matlab 2015a
I'm not sure what you mean by 'unique" in your question title. In the example you give, it looks like you just want to sort the ...

2 maanden ago | 0

| accepted

Answered
Unrecognized function or variable 'dudx'.
As far as I can tell, unless it is in a toolbox that I don't have there is no built in MATLAB function called dudx. If you thin...

2 maanden ago | 0

| accepted

Answered
Plot of head against velocity data based on timestamp similarity
First read in both of your datafiles. Then use MATLAB function interp1 to interpolate values at times matching the times in one...

2 maanden ago | 1

| accepted

Answered
How to split a number into 5 parts equalling the sum of the number
Not sure exactly what you are expecting, but obviously if your total number of rows is not a multiple of 5 then you cannot split...

2 maanden ago | 0

Answered
From frequency to time domain
If I understand what you are asking for correctly I am assuming that your matrix S has the fft of the original time domain data....

3 maanden ago | 0

| accepted

Answered
The voltage and current of the panel at maximum power point ?
You could use this approach. Suppose you first calculate (as I think you show above) equal length vectors of current, I, and vo...

3 maanden ago | 1

| accepted

Answered
Extract rows from a cell array based on keywords
Let say you call your cell array A, then you could do this: % make first column into numerical values rather than strings x = ...

4 maanden ago | 0

| accepted

Answered
MATLAB/Simulink error
It looks like your problem may be that you have a SISO (single input single output) transfer function block (Gnm) but the input ...

4 maanden ago | 0

| accepted

Answered
How do I access AppDesigner variables in a function that I write and call?
So I'm understanding that you have written a function and want to call it from within your appdesigner app. You then want this f...

4 maanden ago | 1

Answered
How can I find the last alpha_k value?
I was just going through your code and made a corrected version. I see now that Torsten has also given you a comment that echos ...

4 maanden ago | 0

| accepted

Answered
How can I find if edges in a subgraph SG appear inside/belong to a graph G?
You can name the edges in G and then the corresponding edges in the subgraph will have the same names as those in the main graph...

4 maanden ago | 1

| accepted

Answered
polynomial regression of a given function
You only solved for the coefficients. If you want to compare the original data and the fit you can do something like this, after...

4 maanden ago | 0

| accepted

Answered
Why do I recieve error when doing sinc function
If you want to plot the sinc value for a range of values then you need to pass it a vector of values. So for example: x = lins...

4 maanden ago | 0

Load more