Answered
How would I add labels to points?
Use the text (link) function. You will likely also need the sprintf function.

7 years ago | 1

| accepted

Answered
RMSE of sequences in cell arrays with different length
I am not certain what final result you want. This should get you started: subt = cellfun(@minus, YTest, YPred, 'Uni',0); ...

7 years ago | 0

Answered
How can I generate reciprocal of a matrix
It depends on what you mean by ‘reciprocal’. If you want ‘X’ such that: A*X = eye(size(A,1)) then: X1 = inv(A); ...

7 years ago | 0

| accepted

Answered
How can print out the below content by MATLAB program?
You do not need the second for loop. Simply print the value of ‘j’ in each iteration of the ‘i’ loop: for i = 1:1:5 j =i...

7 years ago | 1

| accepted

Answered
ERROR message when running code
Your code plots all three variables. Note that they only differ by phase, so the easiest way to detect the difference is where ...

7 years ago | 1

| accepted

Answered
LaTex with 2 strings separated by a num2str
Try this: errordisplay=[' $\varepsilon_{RTP}=$ ',num2str(rtep),'\%']; It seems you need to ‘escape’ the ‘%’.

7 years ago | 1

| accepted

Answered
Matrix Row Addition Question
There are several ways to do what you want. Here’s one: k = zeros(3,6); k(end, 3:6) = 8 : -2 : 2;

7 years ago | 1

| accepted

Answered
How do I write this equation in Matlab?
You need to add ‘x’ to your syms call: syms x then with this solve call: theta_max = solve(V/V_w ,x) you get: theta_m...

7 years ago | 0

Answered
Text Box location Issue
I would define the axis limits just after the plot call with an axis call. The axis limits will not then change in each iterati...

7 years ago | 1

| accepted

Answered
How can I simplify complex symbolic equations? Simplify not working
Tell the simplify function to keep working on ‘eqn’ as long as necessary: eqns = simplify(eqn, 'Steps',150) producing: eqn...

7 years ago | 1

| accepted

Answered
3D array to cell array
Use the mat2cell (link) function: A = rand(550, 129, 3); % Create Matrix C = mat2cel...

7 years ago | 1

| accepted

Answered
Plotting The bodee plots extracted from LTSPICE simulator
MATLAB can read it, however it needs a bit of help in order to understand how to read it. Try this: fidi = fopen('Data.txt'...

7 years ago | 4

| accepted

Answered
make one struct with two datasets
Try this: data.features = rand(84, 1190); data.labels = rand(84,1); See the documentation on Create Structure Array (link) f...

7 years ago | 0

| accepted

Answered
I am trying for filters for my experimental data
My guess is that you used a highpass filter, since it seems that you eliminated the low frequencies and kept the noise. You pro...

7 years ago | 0

| accepted

Answered
how to fit a surface to 3d data points
If your data points are each vectors, try this: x = rand(1, 10); % Create Data y =...

7 years ago | 0

| accepted

Answered
Fitting Cosine function to many different data sets.
Thi idea I deleted is to use the Angle sum and difference identities (link) to linearise your regression, since linear regressio...

7 years ago | 0

| accepted

Answered
Error changing data in table from char to double
The ‘GROSS_QTY’ problem is relatively easy to solve: [~,S] = xlsread('DateAndQuantity.csv'); G_Q = sscanf([S{2:end,2}],'%d;')...

7 years ago | 0

| accepted

Answered
i need to get the maximum amplitude in this code but my final answer is wrong
‘i am fairly certain my code is wrong’ So am I. Try this: D = load('Data.mat'); f = D.f; t = D.t; dt=t(2)-t(1);% t ve...

7 years ago | 1

| accepted

Answered
export frequency data from a histogram
Use a handle to return the information from the histogram function, then get the values you want: figure hh = histogram(x); ...

7 years ago | 0

| accepted

Answered
Matlab 2018b adds-on problem
Try this: Download R2018b (includes R2018b Update 4)

7 years ago | 0

Answered
In which order does polyfit command display coefficients?
The 1.33 value is the slope, and the -4.5 value is the intercept, so they would appear as [1.33 -4.5]. , corresponding to and ...

7 years ago | 1

| accepted

Answered
Finding the delta (subtraction) of two cells in an existing matrix
Use the diff (link) function, and add a ‘0’ to the output, so the row lengths will be the same: time = [ 1 5 ...

7 years ago | 0

| accepted

Answered
Dynamic size differential equation system
I have absolutely no idea what you’re doing. Regardless, your ‘deqns’ function must have as two of its arguments your independe...

7 years ago | 0

| accepted

Answered
system of 5 eq and 5 uknowns, FSOLVE error
There are a few errors in your posted code. Corrected: syms Rsa Vsa P3 q Psa Rsab Vsab Csa Pic Rsv Rlv Pvb Rnet ABP Rla re...

7 years ago | 0

| accepted

Answered
System of 2 differential equations
The code you posted has errors, specifically unbalanced parentheses. I edited your equations to correct this, however I am not ...

7 years ago | 0

| accepted

Answered
How can I decrease the running time of this code?
Use the diff (link) function: Ux = diff(X); Uy = diff(Y); Uz = diff(Z); When I timed your code and diff with these matrices...

7 years ago | 0

Answered
Is there a way to plot everything together using the surf command in matlab?
Use the hold function, and plot the surfaces in a loop. Try this: figure hold all for k1 = 1:size(N_diesel,3) surf(R...

7 years ago | 1

| accepted

Answered
Please Help Me Simple Question
Try this: digprice = @(depth) 6 + ceil(fix((depth+1)))*4; % Digging Price As A Function Of Depth dep = lins...

7 years ago | 0

Answered
Deactivation of a licence on a broken computer not possible
You need to deactivate it in the Licence Centre. See: How can I deactivate MATLAB on a machine I cannot access? (link).

7 years ago | 0

Answered
how to tabulate this results using fprintf?
You only have 5 format fields in your fprintf call. Try this (with all 8): fprintf('%2.0f %12.5f %12.5f %12.5f %12.5f %12.5...

7 years ago | 0

| accepted

Load more