Answered
Error using str2sym (line 83) Unable to convert string to symbolic expression: L 1 (C 103): BADCH: Invalid character(s).
You are using the Unicode ‘En Dash’ (decimal *|8211|*, hex *|2013|*) instead of a normal hyphen (decimal *|45|*, hex *|002D|*) f...

8 years ago | 1

| accepted

Answered
how to calculate rms of fluctuation velocity
You can use the <https://www.mathworks.com/help/signal/ref/rms.html *|rms|*> (link) function in the Signal Processing Toolbox. ...

8 years ago | 0

| accepted

Answered
How to remove/skip text at beginning of a file while reading it using textscan?
If the text line is a separate line at the beginning of the file (as it appears to be), use the <https://www.mathworks.com/help/...

8 years ago | 1

| accepted

Answered
3D stem plot colored by Z-value
This requires a bit more code than I would like, partially because it needs to scale the colors appropriately to match the *|sca...

8 years ago | 2

| accepted

Answered
I 2-D plot of y with specific x
I am _guessing_ here as to what you want. Try this: psnr_val=[22 24 29 32 33]; exp_t =[0.01 0.1 1 10 100]; ...

8 years ago | 0

| accepted

Answered
visioner code changing string
Letters in MATLAB (and most other languages) are represented by numeric values. Since this is homework, we only give hints, so ...

8 years ago | 0

Answered
Find index of an array that corresponds to a given value
I can only _guess_ as to what the exact problem may be without seeing your data. It could be that what you _believe_ to be the ...

8 years ago | 0

| accepted

Answered
Solving simultaneous equations without martix method
You would most likely have to use the Symbolic Math Toolbox: syms x y Eq1 = x + y == 10; Eq2 = x + 2*y == 15; [x...

8 years ago | 1

| accepted

Answered
nlinfit function, not enough input arguments
Assuming that *|‘y’|* exists somewhere in your workspace, and since for *|MATLAB|* Statistics and Machine Learning Toolbox and O...

8 years ago | 0

| accepted

Answered
Textscan has an error with some file names and not others?
Check the second output *|‘errmsg’|* in your <https://www.mathworks.com/help/matlab/ref/fopen.html *|fopen|*> (link) call. It w...

8 years ago | 0

| accepted

Answered
What model would fit a set of values that increase then decrease over time?
Solving for the second compartment in a two-compartment model comes close. Model: [C1] =k1=> [C2] =k3=> [ ] <=k2=...

8 years ago | 1

| accepted

Answered
How can I plot the different values in a matrix as different entities in a single plot?
This plots the row- and column-subscripts, each with the appropriate marker and color. *_The Code_ —* M = [1 3 4 4 1 ...

8 years ago | 0

| accepted

Answered
How do you find a sinusoidal curve on given data without using curve fit tool box?
See <http://www.mathworks.com/matlabcentral/answers/121579-curve-fitting-to-a-sinusoidal-function *Curve fitting to a sinusoidal...

8 years ago | 0

Answered
Is there any function can compute the value of sgn?
The closest you can lkikely get is the <https://www.mathworks.com/help/fuzzy/sigmf.html *|sigmf|*> (link) function in the Fuzzy ...

8 years ago | 1

| accepted

Answered
plot confidence interval of a signal
In order to calculate the *|95%|* confidence intervals of your signal, you first will need to calculate the *|mean| and *|std|* ...

8 years ago | 8

| accepted

Answered
Hi!! What is wrong in my code?
First, MATLAB parses matrices differently than you would expect it to, so your original *|‘eqns’|* system is (as MATLAB reads it...

8 years ago | 0

Answered
Display array values side by side
Force *|‘real’|* and *|‘imag’|* to become column vectors first: fprintf(fileID,'%8d\t %8d\n',[real(:), imag(:)]') or ve...

8 years ago | 1

| accepted

Answered
I need help for coding or writing Active Appearance Model (AAM) for chest radiography images?
In the column to the right under *‘Entire Website’* are *|3|* links to File Exchange contributions for Active Appearance Models....

8 years ago | 0

Answered
Linear regression model with fitlm
You may have to do a separate *|anova|* call to get it: Anova = anova(correlation); AnovaP = Anova.pValue(2); That w...

8 years ago | 0

| accepted

Answered
is it possible to add a 3D sphere marker to a 2D plot?
Try this: [Xs,Ys,Zs] = sphere; figure for k1 = 1:0.03:3.2 Xp = Xs + cos(k1*2*pi); Yp = Ys + sin(k1...

8 years ago | 1

Answered
Systems Biology - Maltus Law
Use this *|ode45|* call instead: [t,x] = ode45(@(t,z)sysbio1(t,z,k),tspan,x0); and change the *|plot|* call to: p...

8 years ago | 0

Answered
How to fit a curve to my data?
Consider using the <https://www.mathworks.com/help/matlab/ref/spline.html *|spline|*> (link) function.

8 years ago | 0

Answered
how can I plot this differential equation?
Add this to the end of your posted code: [VF,Subs] = odeToVectorField(eq); DE = matlabFunction(VF, 'Vars',{t,Y}); ...

8 years ago | 0

| accepted

Answered
How to solve this problem using loop and If?
I am not certain what you want to do. I added an *|if|* block that appears to do what you want. It may not produce the result ...

8 years ago | 0

| accepted

Answered
how to draw multiple lines?
Try this: deg = 0 : 5 : 90; r = 1; x = r*[zeros(size(deg(:))) cosd(deg(:))]; y = r*[zeros(size(deg(:))) sind(deg(...

8 years ago | 2

| accepted

Answered
less than or equal and greater than of equal operations
The vector you posted _may_ not be showing the full precision of the values in it. If you calculated them (or imported them wit...

8 years ago | 0

| accepted

Answered
How to find the indexes of the nearest value in a loop
The <https://www.mathworks.com/help/matlab/ref/ismembertol.html *|ismembertol|*> (link) function is likely most appropriate. ...

8 years ago | 0

Answered
Problem using bandpass IIR filter
I would normally suggest using the *|filtfilt|* function, however the filters returned by *|designfilt|* appear to be more appro...

8 years ago | 0

| accepted

Answered
How can I plot 2 rings in 3D?
Try this: *_The Code_ —* N1 = 200; % Number Of Points In Ri...

8 years ago | 0

| accepted

Answered
Weird results of Calculating Integration of Normal/Gaussian Distribution
See the documentation section on: <https://www.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html#f2-98690 *Accur...

8 years ago | 0

| accepted

Load more