Respondida
plotting of mean function of exponential random variables
The plot created by histogram has count on the y axis by default. If you would like the y axis to instead give probability, you ...

alrededor de 4 años hace | 0

Respondida
how to change axis fort size
By setting the 'FontSize' property of your axes. For example, if the axes handle is contained in ax, you can use ax.FontSize = ...

alrededor de 4 años hace | 0

Respondida
Error Using audioread : Expected input number 2, range, to be positive.
audioRead() requires that the second input contains two positive integers. I would guess, based on the code and the error, that ...

alrededor de 4 años hace | 0

| aceptada

Respondida
Add new DropDown item in App designer 2019a
This will add the edit text's string to the drop down's list of items as long as it is not already there: function EditFieldVal...

alrededor de 4 años hace | 2

| aceptada

Respondida
Using inputdlg and isnan
In your code, NOF never changes inside the loop. Therefore, if the loop enters, it won't ever exit because the exit condition wi...

alrededor de 4 años hace | 1

| aceptada

Respondida
how to plot data from a cell array that the numbers are type string?
Note that str2double for the character vectors you have returns NaN: >> str2double(' 6 . 6 0 0 0 0 4 e - 0 7 ') ans = ...

alrededor de 4 años hace | 1

Respondida
peaks of plot in UIAxes appdesigner opening in another window
Problem According to the docs for findpeaks, a plot will be generated as long as no outputs are requested. After messing around...

alrededor de 4 años hace | 1

| aceptada

Respondida
Plotting multiple y axes on one side only using addaxis
It looks like that function flips back and forth between adding the new axes to the left and adding them to the right. How about...

alrededor de 4 años hace | 0

Respondida
How can I extract from Matlab two vector with diferrent dimension in to the same excel page without having to create different sheets
One option, which leaves a blank column between the two sets: T2 = table(X2(:), Y2(:)); writetable(T2, fileName, 'Range', 'D1'...

alrededor de 4 años hace | 1

| aceptada

Respondida
Error using textscan Invalid file identifier Use fopen to generate a valid file identifier in app designer
It doesn't seem like your upload button stores anything. It saves the file and path into file and path and then exits, at which ...

alrededor de 4 años hace | 2

| aceptada

Respondida
Expand matrix pattern by rows only
You can give multiple dimensions to repmat: repmat(x,1,365)

alrededor de 4 años hace | 0

| aceptada

Respondida
Is it possible to use outcomes of functions in another script, without running that function first?
You can call your first function in your second function like so: function [Outcome1, Outcome2] = advanced(x,y) [Alpha, Beta, ...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to draw a number of line in a unit cell
Use theta(i) to access the ith angle from your array theta. Also, there is no need to store line positions in x(i+1) and y(i+1) ...

alrededor de 4 años hace | 0

| aceptada

Respondida
Matlab is calculating standard deviation wrongly
std calculates the sample standard deviation: >> sqrt(((-3)^2 + (0)^2 + (3)^2)/(2)) ans = 3 . sqrt(6) would be the ...

alrededor de 4 años hace | 0

Respondida
Iterate through indexes creating a new matrix
Try this: i = 1:size(C,1); D = C(any(i>=A & i<=B),1); Works with the following simple arrays, but let me know if it doesn't w...

alrededor de 4 años hace | 0

| aceptada

Respondida
Adding axes to histogram on scatterhist, and changing graph area
How about something like this? figure(3) h = scatterhist(rand(100,1), rand(100,1),'Marker','.','MarkerSize',10,'Color','k','NB...

alrededor de 4 años hace | 2

| aceptada

Respondida
The logical indices in position 1 contain a true value outside of the array bounds.
For the following sample array, >> A = randi(5, 5, 5) A = 3 1 5 2 4 2 2 4 3 2 ...

alrededor de 4 años hace | 0

Respondida
Error using matlab.graphics.Graphics/set The name 'handlevisibility' is not an accessible property for an instance of class 'matlab.graphics.GraphicsPlaceholder'.
Similar to how a(3) = true fills a(1) and a(2) with false, your SkMp.uic3 (which is a 4x9 Graphics array) fills empty values w...

alrededor de 4 años hace | 0

Respondida
Rotate a spot in a binary image by 45/-45 degree
Quick note: I started working on this, then stepped away for a bit, then came back and finished. Despite ImageAnalyst's great an...

alrededor de 4 años hace | 0

| aceptada

Respondida
Compare positions of strings in two cell arrays having the same string elements
F1 = {'ETA.csv', 'GAMMA_P.csv', 'MAG.csv', 'parameters.csv', 'PRESSURE.csv', 'shearhistogram.csv'}; F2 = {'PRESSURE.csv', 'ETA....

alrededor de 4 años hace | 1

| aceptada

Respondida
need some help matlab code has an error
(1) Use B where you have b. (2) Change fprint to fprintf. A = [6 2 1 1;2 7 1 2;3 2 8 1;1 2 6 9]; B = [6;4;5;3]; maxitr = 100...

alrededor de 4 años hace | 0

Respondida
How to use structure variable names in for loop
Loop through the structures instead of their names: Structure={A,B,C,..,n}; for i=1:numel(Structure) output= Structure{i}.fie...

alrededor de 4 años hace | 0

| aceptada

Respondida
how to extract and use the uicontrol from an cell array
Indexing into a cell array with ( ) gives you another cell array. Use { } instead to access the data inside that cell array: fo...

alrededor de 4 años hace | 0

| aceptada

Respondida
How do i read the exact values from a textfile
fileread is reading each character from the file. If you want to interpret those characters as numbers, one option is to use tex...

alrededor de 4 años hace | 0

Respondida
Calculating percent of data in table
For the following table: T = table; T.data = randi(10,1,12); you can use: T.percentages = 100 * T.data ./ sum(T.data); whic...

alrededor de 4 años hace | 2

| aceptada

Respondida
Write function with multiple output, like sort()
function [out1, out2, out3] = myfunc ... end As an example, this function has 3 outputs. You can call it with [a, b, c] ...

alrededor de 4 años hace | 2

| aceptada

Respondida
The following Matlab code runs only half of the for loop. Can anyone help me figure out the problem?
PayloadBits((ind*MSDU*NumDataCarriers)+1:(NumDataCarriers*MSDU)*(ind+1),:)=[]; This line changes the size of PayloadBits, but y...

alrededor de 4 años hace | 0

| aceptada

Respondida
A method to control on a certain variable n is present in a column (left or right) of a matrix
Possibly this? >> any(Edge==2) ans = 1×2 logical array 1 1 % 2 is present in both >> any(Edge==1) ans = ...

alrededor de 4 años hace | 1

| aceptada

Respondida
Force element access inside for loop
Is p a column vector? Notice the difference between the following: >> for i = 1:3 disp('a') end a a a and >> for i ...

alrededor de 4 años hace | 0

| aceptada

Respondida
Index occurences of number combinations in a table
How about this? T = table; T.A = [1;2;3;3;3;4;4;4;5;5;5;6;6;6]; T.B = [1;1;1;4;5;1;4;5;1;4;5;1;4;5]; idx = splitapply(@(a) a...

alrededor de 4 años hace | 0

Cargar más