how to solve the following equation?
Try this — a=[1,2,3]; afcn = @(b) ((b-2).*(b+1))./((b+3).*(b-1)); [estb,fval] = fminsearch(@(b) norm(afcn(b) - a), rand) ...

13 días ago | 0

| accepted

How to plot 3D filled contour ?
It would help to know the data and the desired result. One option is to use the surf function and contour3 — [X,Y,Z] = peak...

14 días ago | 0

Using ode45 for a non linear differential equation with a term in a vector form
I do not understand the problem. Is the objective to estimate a parameters of the differential equation from data? The tim...

14 días ago | 0

| accepted

why do I get an error "First input argument must be a function handle"
I have no idea what the code does. See if this paproximates the desired result — nUn = 2000; nU2n = 1500; nU3n = 200;...

14 días ago | 1

I need help solving RC circuit using Leplace inverse, then graph the output which is in the symsum form
Sometimes a bit fo force (such as using vpa) is necessary — syms s t Ys2(s)=((2*s^2+7*s+3)/(2*s^3+11*s^2+15*s+4)*(2*s+2)/(...

14 días ago | 1

| accepted

2D contour plot with given matrix
Two possibilities — M = [25, 25, 25 111.5, 137.8, 245.1 146.3, 178.3, 296.4 111.5, 137.8, 245.1 25, 25, 25]; figure ...

14 días ago | 0

| accepted

from curve fit to look up table
The question is a bit ambiguous. Interpolation of some sort would appear to be the best option, and of course the approach de...

14 días ago | 0

Curve fitting for multivariable
There are several options. I’m using fminsearch here. xdata = ... [0.882263937 0.882263937 0.882263937 0.882263937 0...

14 días ago | 0

| accepted

Change x axis increments
See Axes Properties, specifically XScale, YScale, ZScale. .

15 días ago | 0

How can I make a single letter or specific letters bold without using the latex interpreter for title, axis, and labels?
Se the Interpreter property in the text documentation. The default interpreter is 'tex', and it is possible to use it with any ...

15 días ago | 0

| accepted

How can I add conditions to a system of equations?
Use the assume function — syms q w e r t y u i o real assume([q w e r t y u i o]>=1 & [q w e r t y u i o]<=9) eqn1= (w*r)/...

15 días ago | 0

| accepted

Plot fitting curve (x,y) in 3D (x,y,z)
One option is the waterfall plot. I would start with it. . .

15 días ago | 0

| accepted

Mesh Plot surface dimensions must agree
The easiest solution in that instance is either to reverse the first two arguments to surf or transpose the ‘Z’ matrix. .

15 días ago | 1

Calculating gradient of f in point A?
Create them as functions — syms x1 x2 f = x1 + x2^2; A = [5, 6]; f_grad_diff(x1,x2) = [diff(f, x1), diff(f, x2)]; f_grad...

15 días ago | 0

| accepted

How do i find the ZCR of a speech signal?
The easiest way is to use the zerocrossrate function in the Signal Processing Toolbox (however that likely amounts to cheating)....

15 días ago | 0

How to perform global sensitivity analysis on a set of data
This is new to me. The only reference I was able to find (other than the SimBiology functions) is this GitHub link Global sensi...

15 días ago | 1

| accepted

PLOTTING BAR GRAPHS with different colors
Try this — A = rand(1,400); x = 1:400; figure hb = bar(x, A); hb.FaceColor = 'flat'; hb.CData(1:10,:) = [ones(10,1) z...

16 días ago | 0

| accepted

How to create a diagonal matrix that starts at (1,1)?
Without using repmat — n = 4; lambda = 0.2; A = diag([0 ones(1,n)]*lambda) ,

16 días ago | 0

| accepted

first two inputs must have the same number of elements error(hw deadline soon)
Check the code to be certain that the first two input arguments are the same length. If they are not, change the code so that...

16 días ago | 0

Indexing a vector in a particular fashion
Index it pretty much exactly as ot was written — v = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; idx = [9, 10, 7, 8, 5, 6, 3, 4, 1, 2]; ...

16 días ago | 0

can't fing notching filter
First, the bandstop function is likely an effective substitute. Second, both FIR and IIR notch filters are straightforward to...

16 días ago | 0

How to split an array of tot seconds in windows of 60 sec haveing also windows without values?
I am not certain what the desired result is, however if I guess correctly the buffer function may be the solution. .

16 días ago | 0

I want to plot two spheres. It appear as ellipses. Can anyone help me?
Adding axis('equal') solves it! a=1; L=0.1; dd=5; c =-a/L; b =a/L; m =a*60; % [x,y]=meshgrid((c+...

16 días ago | 0

| accepted

Too Many Input Arguments
This works (with and without the norm call) — v = [0.1, 0.1, 0.1, 0.1, 0.1]; [B,fv] = fminsearch(@kinetics123, v) ...

16 días ago | 1

| accepted

loop for species names
Try this — Species = @(n) strrep(compose('C%dH%d', [n(:) 2*n(:)+2]), '1H','H'); Hydrocarbon = Species(1:5) Back to my ...

16 días ago | 1

| accepted

How to calculate the subtended angle ?
See my Answer to How can I calculate the angles between a polygons vertices? for an approach that appears to work. .

17 días ago | 0

| accepted

x,y,z values in 3d plot

17 días ago | 0

| accepted

3D plot from excel
Thanks for quoting my code! The second column ‘Y Coordinate (mm)’ is identically zero. The griddata function will of course ...

17 días ago | 1

| accepted