Answered
what function can be used to divide matrixes with n length
The must both be the same length, and ideally the same row and column sizes. M = x ./ y Note the ‘./’ denoting element-wise ...

7 years ago | 1

| accepted

Answered
How can I don't display the x values labels in heat map?
Try this: data1 = randi(9, 3); figure h1 = heatmap(data1); cdl = h1.XDisplayLabels; % ...

7 years ago | 1

| accepted

Answered
simple code for the log computation
Since ‘X’ is a cell array, you first must convert it to a double array, here using ‘[X{:}]’: X = { 1, 2, 3, 5, 6}; M = log10(...

7 years ago | 1

| accepted

Answered
Quiver plot arrows hidden by surface plot?
I was considering something like this: x = linspace(-pi, pi, 20); h = x(2)-x(1); [X,Y] = ndgrid(x); Z = sin(X) .* cos(Y); ...

7 years ago | 0

| accepted

Answered
Left and right sides have different number of elements
Both ‘R_e’ and ‘k’ are (1 x 10) vectors, so ‘f’ will also be a (1 x 10) vector. Try this: f(counter,:)=pipe(R_e,k); With t...

7 years ago | 0

| accepted

Answered
Linear Regression Code Formula
The polyfit function creates a least-squares fit of the data to a polynomial, given the independent and dependent variable data,...

7 years ago | 0

| accepted

Answered
how to generate a vector of zeros with 2 random successives cell containing ones
I have no idea what you want. Try this: z = zeros(1, 20); % Vector Of 20 Zeros idx = randi(n...

7 years ago | 1

Answered
Remove or hide the special Y-axis label
Change your axis call to: axis([0 8 0.94 1]) That should do what you want.

7 years ago | 0

| accepted

Answered
Parameter estimation in ODE
You are trying to fit 5 columns of your differential equation to 4 columns of data. That will throw the error you got. Chang...

7 years ago | 0

| accepted

Answered
How to remove NaN values from an array
Since you want the lines to be continuous, consider using the fillmissing (link) function to fill in the NaN values with numbers...

7 years ago | 0

| accepted

Answered
How do I output to the command window where the sum of the bars on the graph equal zero along the x axis
If fyou are referring to ‘PWA’, try this (after your plot call): for k = 1:size(PWA,1) PWA0(k) = interp1(PWA(k,:), x, 0, ...

7 years ago | 0

Answered
Filling missing values of selected columns of a table with previous values
You most likely have to use fillmissing with each variable separately: Data.English = fillmissing(Data.English,'previous'); D...

7 years ago | 1

Answered
Why does the line for my graph not appear?
The reason is that ‘b’ has only the value at the end of the loop, so a scalar. Try this: syms x f = 5./((7+x).^2); a=0; ...

7 years ago | 0

| accepted

Answered
I am trying to accomplish this same task using the find() command but I'm not sure how.
Here is a version that uses a logical vector in place of the find function: x = 0:0.1:6; y = -5*x; lv = (2 <= x) & (x <= 4);...

7 years ago | 1

| accepted

Answered
getting user input in title and legend
I would use the inputdlg (link) function. You can also use input.

7 years ago | 0

Answered
Surface Plot for ODE solution
You need to make a few changes in your code: w = 1; k=1; figure tspan = linspace(0, 5); % ...

7 years ago | 0

| accepted

Answered
Solving Integrals with Matlab
There is an error in the anonymous function in ‘A3’, and since MATLAB is case-sensitive, ‘Intfun’ is not the same as ‘intfun’. ...

7 years ago | 0

Answered
Why is my Graph not plotting properly?
Add a counter. At the beginning of your while loop: k1 = 0; theta = 0; % Rotational arm angle % while(theta <= 360) % Bei...

7 years ago | 1

Answered
A Problem with function
Save it on your MATLAB search path of user files as: normalidade.m.

7 years ago | 0

| accepted

Answered
Phase Plot - Velocity vs Position
Unless I am not understanding your code, that would appear to be: figure(2) plot(y, v) grid xlabel('Position') yleabel('Ve...

7 years ago | 0

Answered
Fsurf plot wrong when x coefficient is 0
The fsurf function cannot guess what you are thinking. Try this version of your code: syms x y z u v f1(v) = 214.906098118...

7 years ago | 0

| accepted

Answered
Frequency scale in fft after zero filling (odd/even number of data)
I am not certain what you are doing. One way to make the frequencies equal would be to use the second argument, ‘n’, in the ff...

7 years ago | 1

| accepted

Answered
How do I extrapolate a point from a generated graph.
The easiest way is to use the interp1 (link) function to get the time when the car has travelled 250m.

7 years ago | 0

| accepted

Answered
How to use a subplot in a for loop
I am not certain what you want. Try this: syms y x y = acos(x); n = [3 5 7] ttlc = {'y', 'T3(x)', 'T5(x)', 'T7(x)'}; ho...

7 years ago | 0

Answered
How do I get some part of my boxplot labels italic? I can not change the Interpreter to 'tex' somehow? Why? How can I work around?
Use the 'TickLabelInterpreter' property: dados = rand(100,2); boxplot(dados,'labels',{'\bf\it{IDEB}__{2007}','\bf Efficiencie...

7 years ago | 0

| accepted

Answered
MATLAB system of ODEs
Please see: System of 2 differential equations (link).

7 years ago | 1

| accepted

Answered
i am trying to put my level curves and gradient vectors on same figure but i can't
Your current approach is not going to work. Try this instead: f=@(x,y) 16*y.^2 + 9*x.^2; g = @(z) gradient(z) figure(1) ...

7 years ago | 1

| accepted

Answered
How to change color for stacked bar chart
Try this: y = [50 50; 25 75; 30 70]; figure ba = bar(y,'stacked', 'FaceColor','flat'); ba(1).CData = [0.3 0.3 0.7]; ba(2...

7 years ago | 2

| accepted

Answered
Does audioread not return a vector?
It depends on your audio file. A stereophonic signal will return an (N x 2) matrix, with the first column being the left channe...

7 years ago | 0

| accepted

Answered
amplitude plot not working
Your ‘A’ vector has purely imaginary components. Try this: plot(omega, imag(A))

7 years ago | 0

Load more