Answered
Error occurring while solving odes using ode15s
The computed solution might be "nan" or "inf" only. Briefly speaking the size mismatch.

4 years ago | 0

Answered
Sphere to Plane Contact Force : problem with an impact
You should use in this case "ODE event location" opts while building your model. See: https://www.mathworks.com/help/matlab/mat...

4 years ago | 0

| accepted

Solved


Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

4 years ago

Solved


Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

4 years ago

Answered
I would like to have sigma and epsilon in greek symbols in y and x axis respectively (with latex interpreter)
xlabel('\epsilon, [-]'); ylabel('\tau, [MPa]')

4 years ago | 0

Answered
I am getting following error in code: Undefined function 'ctwoD' for input arguments of type 'double'.
The fcn ctwoD() in your code is not a MATLAB fcn unless you've created it. If you've created it, make sure it is residing in you...

4 years ago | 0

| accepted

Answered
I would like to have sigma and epsilon in greek symbols in y and x axis respectively (with latex interpreter)
xlabel('$\epsilon$', 'interpreter', 'latex'); ylabel('$\tau$', 'interpreter', 'latex')

4 years ago | 0

Answered
What is the difference between the "RMSE" and the validation "RMSE" in the Curve Fitting Toolbox?
Note that in your upper plot figure, your fit data is shown and "RMSE" computed for and in the bottom one, some fit (validation...

4 years ago | 0

Answered
Denoise an eog signal
There are a few different filters to test with your data, e.g. data smooting, moving average, Savitzky-Golay, etc. You can test ...

4 years ago | 0

Answered
How do I ensure the loop is executed for the duration of the counts i.e. 10 inside the loop?
In your code, there are a few crucial errs, i.e.: (1) no need to introduce a new variable range that creates conflict with mat...

4 years ago | 0

Answered
how to solve partial differential equation?
You can employ pdepe().

4 years ago | 0

Answered
Using find command to group data into bins
If I have undersood your question correctly, in this case, find() is not quite efficient. Thus, you can better create just indxe...

4 years ago | 0

Answered
How do I ensure the loop is executed for the duration of the counts i.e. 10 inside the loop?
There is an err in your code: ... xpred(k,:) = xsk; % Corrected line ...

4 years ago | 0

Answered
How can I split an array?
Vw1=Vw(:,1); Vw2=Vw(:,2); Vw3=Vw(:,3); Vw4=Vw(:,4);

4 years ago | 0

Answered
How can I delete data from a variable in a table?
In fact, it is not viable to delete only rows as dpb stated. Otherwise, if you'd like to remove all elements of specific rows,...

4 years ago | 0

| accepted

Answered
Matlab function can't reach 2nd element of the input.
In your simulink model, a mutiplication block (?) has to have matrix multiplication operation. The elementwise multiplication is...

4 years ago | 0

Answered
How can i plot hyperspectral image data with kmeans?
Remove in your code line 1 and last one, e.g.: clear; data = multibandread('D:\Project\20201027_210119\cube_envi32.dat...

4 years ago | 0

| accepted

Answered
How to retrieve location values in a matrix
% e.g.: A = randi([0, 13], 4,6) A(3,1), A(4, 2), A(1,3)

4 years ago | 0

Answered
how can i solve integral equation ,symbolically methode by using a matlab
You can start by initiating the variables via syms, e.g.: syms t x y = expression1; f = expression2; Sol = solve(y+integral(...

5 years ago | 0

Answered
Fmincon solution is same as initial guess
THere are a couple of errs oin your fcn, i.e. y0, a,b,c,d not defined. Moreover, x is not defined. function J=cost_function(y0,...

5 years ago | 0

| accepted

Answered
Compare 2 string documents
The err is here: if AIS1 == AIS2 % ERR % Corrected one: if AIS1(i) == AIS2(i) Note that sizes of AIS1 and A...

5 years ago | 1

Answered
how many times is a value repeated in a table
N20=sum(tab.prob(:,1)==20); % Times of 20s N50=sum(tab.prob(:,1)==50); % Times of 50s N100=sum(tab.prob(:,1)==100); % Times of...

5 years ago | 0

| accepted

Answered
I coded this and it types me error
The loop operation canNOT be assigned twice in one for. Your code has to be in this format: for i=1:N % You can skip ste...

5 years ago | 1

| accepted

Answered
code for model online
Run this in your MATLAB command window: >> sm_cable_elevator Also, you can get it with: >> open sm_cable_elevator

5 years ago | 0

Answered
How to add error bars to a timeseries plot using datetime values
Maybe you should try to employ datenum(), e.g.: x= datenum(ts1); % See help doc how to get datenum() errorbar(x,y...

5 years ago | 0

Answered
How can i optimize the code and connect the functions?
One quick and easy suggestion is to employ readtable() instead of xlsread().

5 years ago | 0

Answered
how to add zero padding to text file to make 250x4
X = load("Test0.txt"); % Original data file x1 = zeros(250,4); % Zeros 250-by-4 XX = [x1;X]; % All d...

5 years ago | 0

Answered
Convert older simulink model to newer version
Open the original model in Simulink 2019b and save it as 2019b model (*.slx or *.mdl).

5 years ago | 0

Solved


Make a list string
Given a cell string, produce a string separating the items with spaces and commas and with an 'and' preceding the final item, an...

5 years ago

Answered
HAVING TROUBLE WITH PLOTTTING
% Here is a slightly edited/fixed version that works ok. while(1) [val,Principal,Number,Interest] = inputvalues; if(...

5 years ago | 0

Load more