Answered
How to Put Dots on Sphere Mesh Node Points?
Try this (replacing the surf call): figure scatter3(r.*x(:),r.*y(:),r.*z(:), 0.001+z(:)*100, 'o', 'filled'); %# Plot the sur...

6 years ago | 1

| accepted

Answered
How to 'map' an equation in another?
I have no idea what you want to do. Try this: mu0 = @(A1,A2,T,Tg,E) (E.*exp(A1.*(T-Tg)./(A2+(T-Tg)))).*(T>Tg) + E.*(T<=Tg);...

6 years ago | 0

Answered
Plotting Surface thorugh a Matrix of Results
It depends on what ‘x’ and ‘y’ are. If they are gridded (regularly repeating), then reshape will work to convert all of them to...

6 years ago | 0

Answered
Adding a legend for different data sets
The way I originally wrote that code, the points and the best fit lines all appeared (subsequent revisions had the data and line...

6 years ago | 0

Answered
I want to create a plot using X Y coordinates
Use the text function. Example: — x = rand(1,5); y = rand(1,5); nrc = compose('%2d',1:numel(x)); % Coordin...

6 years ago | 0

| accepted

Answered
How do I set the threshold value on the action potential on the upward and downward slope to define width?
I am not certain how robust this is, since we only have one record. However it could likely be adapted easily to other records ...

6 years ago | 1

| accepted

Answered
Why would this integral function be explicit?
I would solve it numerically: T = 1; sigma = 0.3; r = 0.09; a = r - sigma^2/2; K = 100; S_0 = 100; % syms t gamma_s; eq...

6 years ago | 0

Answered
Need help with matlab code
Tv=1000; % K T0=300; % K Q=1.38e-23; L=1e-4; % m. syms T(t) DE = diff(T) == -Q*(Tv^4-T0^4)/3*L*T; DEs = dsolve(DE, T(0)=...

6 years ago | 0

| accepted

Answered
Matlab documentation is missing
I am not certain what the problem is. Run these: restoredefaultpath rehash toolboxcache from a script or your Command W...

6 years ago | 0

Answered
Finding local minima and maxima
You already found the correct functions. Applying them appropriately appears to be the problem. Try this: t = (0:100)*0.6...

6 years ago | 1

| accepted

Answered
plotting power Vs frequency graph
I am not certain what the probme is with pwelch. It appears to give the correct result when I plot it. Alternatively, try th...

6 years ago | 2

| accepted

Answered
Mark a point on graph
Try this: r = 10^5 ; V = 10^10 ; c_i = 100 ; t = logspace(-2, 7, 20); c_L = c_i.*(1-exp((-r.*t)./V)); Q1 = nnz(diff(c...

6 years ago | 0

| accepted

Answered
How to use fprintf for a symbolic matrix
Try this: syms n2 n1 R d ; RS = [1, 0; -(n2-n1)/(n2*R), n1/n2]; P1 = [1, d ; 0, 1]; RF = [1, 0; 0, n2/n1]; Lplanoconvexe =...

6 years ago | 0

Answered
How to replace a for loop that contains an if statement?
One of these should do what you want: A = -5 + (5+5)*rand(10,1); B = -5 + (5+5)*rand(10,1); LogicalReference = (A.*B)>0; ...

6 years ago | 0

| accepted

Answered
How to insert an if conditional in ode45?
Try this: x0=-70; t0=0; dt=0.1; tmax=20; % tvec=t0:dt:tmax; tvec = [t0 tmax]; opts = odeset('Events',@depolEvents); f...

6 years ago | 0

| accepted

Answered
estimation parameters of coupled ODE to fit given solutions
There are several examples available, one being Parameter Estimation for a System of Differential Equations

6 years ago | 0

Answered
Why are the lines not showing up on my graph?
I am not certain what you want to do. Try this: N = [10 90 1000]; % number of peers F = 20 * 1024; % converting Gbits to M...

6 years ago | 1

| accepted

Answered
Why is my code only outputting one value instead of a vector?
That is because you did not index ‘r’. Either do this (without the loop): t=0:0.05:(pi/2) r=(v_0^2/g)*sin(2*t);%#ok<NOPTS>...

6 years ago | 0

| accepted

Answered
Where is documentation on how to plot a 3d path x(t),y(t),z(t)?
The plot3 function would appear to be an appropriate place to begin.

6 years ago | 0

Answered
How to fit data in exponential fit (R = exp(-q*D)) and find coefficient "q" using Maximum Likelihood Estimate (MLE)?
in the documentation for mle, see the section on pdf or cdf, dependong on what you are fitting.

6 years ago | 0

Answered
Averaging multiple matrices with the cell array
Try this: Cmean = mean(cat(4,C{:}),4); That concatenates the cells across dimension 4 and then takes the mean across dimensio...

6 years ago | 0

| accepted

Answered
How to sort a matrix ?
The sortrows function can likely do what you want.

6 years ago | 0

Answered
How to change this lsqcurvefit code in order to get no errors?
Note that ‘x’ is not used in ‘f’. The result is that ‘f’ returns a scalar, that being ‘f’ evaluated only for ‘a0’. I have no...

6 years ago | 0

| accepted

Answered
problem with 'extract' function
The extract function was introduced in R2020b. If you have an earlier version/release, you need to upgrade to be able to use it...

6 years ago | 1

Answered
Symbolic plotting of Fourier integral
If there are no values, then there is no plot, since plots require numbers. If you have values, make the appropriate substitu...

6 years ago | 1

| accepted

Answered
Count the number of intersections between two curves
This is actually straightforward. The curves intersect where the difference is 0, so subtract them and find the zero-crossings ...

6 years ago | 1

Answered
contouring of 3 vectors
I was able to import these and get an actual datetime array out of the first column: T1 = readtable('Data.csv'); T1.Var1 = ce...

6 years ago | 0

Answered
Creating a string of letters X number of time for a length of L
The randi function requires an upper limit (or range) of the integers it is suposed to return. It requires at least one argumen...

6 years ago | 0

Answered
2d scan plot in matlab
What your Question lacks in clarity it makes up for in obfuscation. See if my Answer to Create array from table with observat...

6 years ago | 0

| accepted

Answered
Create array from table with observations with two codes
The accumarray function is perfect for this: x = readtable('Wtst.csv'); [G,code1,code2] = findgroups(x.code1,x.code2); [Ux1,...

6 years ago | 0

| accepted

Load more