Respondida
How can I ensure that the initial solution (x0) for fsolve does not result in Inf or NaN values?
The approach I use (if possible) is to plot the function first. Most of the time, it is possible to plot it in one or two dimen...

más de 2 años hace | 0

| aceptada

Respondida
How to plot the error of two numerical methods on the same graph?
I cannot run your code because I do not have arguments for the functions. (I tweaked them to make them a bit more efficient.) ...

más de 2 años hace | 1

| aceptada

Respondida
How to add ytick as we want in Matlab?
Perhaps setting the 'YScale' to 'log' will do what you want — mean = [10^-3, 10^-4, 10^-5, 10^-6, 10^-7, 10^-8]; variance =...

más de 2 años hace | 0

| aceptada

Respondida
Extracting 2 columns from a excel file and send them to an own matrix file
Perhaps something like this — opts = detectImportOptions('tempDataTrollhFlygpl.xlsx', 'NumHeaderLines', 9, 'VariableNamingRul...

más de 2 años hace | 1

| aceptada

Respondida
Rotating text to 90 degrees
I’ve never used PsychToolbox, however that would be relatively straightforward in MATLAB graphics — alphabetT = 'T'; figure...

más de 2 años hace | 0

Respondida
How can I load .trf data files into MATLAB?
There appear to be several different definitions of that extension in an onlilne search. I suggest using the type function fi...

más de 2 años hace | 0

Respondida
fplot and quiver return "Error using box"
See if you have something else in your MATLAB search path named ‘box’. which box -all That is the only thing I can think of...

más de 2 años hace | 0

| aceptada

Respondida
A 2D circle divided into 10 sectors in the 3D plot.
I am not exactly certain what you want. One approach — r = 7.5; ac = linspace(0, 2*pi, 500).'; xc = r*cos(ac); yc = r*si...

más de 2 años hace | 0

| aceptada

Respondida
How to add date,time corresponding to some incrementing count data in csv Excel file with help of MATLAB.
You can tell the datetime function how to interpret the available information with the 'InputFormat' name-value pair. See the d...

más de 2 años hace | 0

Respondida
How to simplify the symbolic expression?
When I simplified it offline, using: Expression = simplify(Expression, 500) this was the result : Expression = Vpo*Vsecm...

más de 2 años hace | 0

| aceptada

Respondida
Scattered Interpolant in matlab
The interpolation Method options are 'linear', 'nearest' and 'natural' (natural neighbor interpolation, giving no details that I...

más de 2 años hace | 0

| aceptada

Respondida
How do I plot a timeseries?
Use readtable. You can either use detectImportOptions to import the time as a datetime variable, or convert it after importing...

más de 2 años hace | 0

Respondida
How to import data with titles and plot on a plane
I am not exactly certain what you want. One way of plotting them in 3D and also projecting them on a plane is to combine a stem3...

más de 2 años hace | 0

| aceptada

Respondida
How to get Scalogram from an EMG raw data
If you have the Wavelet Toolbox, use the scattergram function (introduced in R2018b). Alternatively, search for scalogram on...

más de 2 años hace | 1

| aceptada

Respondida
Convert Julian Date + Time in GMT to calendar day + Time in EST
This works — syear = '2024'; JDDD = 'J025'; % Julian date GMT = '19:29:29.231'; % GMT time doy = sscanf(JDDD,'J%3d') DTUCT...

más de 2 años hace | 1

| aceptada

Respondida
from txt to dat file
I would use either readtable or readmatrix, specifying the semicolon as the delimiter and ignoring the space delimiter — % r =...

más de 2 años hace | 0

| aceptada

Respondida
Opening Multiple .csv files
If you want to plot each file in a different figure, create a new figure for each file. You can easily do that in the loop th...

más de 2 años hace | 0

Respondida
How do I use Matlab to create a boxplot?
There are two options, the Statistics and Machine Learning Toolbox boxplot function and the core MATLAB boxchart funciton. Bot...

más de 2 años hace | 0

Respondida
Interpolate x value at single y value in dataset.
Having your data definitely helps! Try this — % DT = datetime(2024,2,12) + minutes(0:15:13*60).'; % TC = rand(size(DT))*6+...

más de 2 años hace | 1

| aceptada

Respondida
Why does Matlab not simplify this further?
Increase the ‘Steps’ value. It will then continue simplifying until it cannot simplify further, or reaches the maximum ‘Steps’ i...

más de 2 años hace | 0

Respondida
How do I make this type of graphics, is it with scatter? For your answers, thank you!
It looks to me like a scatter plot with the autumn colormap, square filled markers, and black outlines for whatever they are sup...

más de 2 años hace | 3

| aceptada

Respondida
Stationary point Code Error. Trying to find stationary points for the equation below. Was having a hard time doing it by hand so tried a code.. getting error for fsolve.
One problem is using zero for any initial parameter estimate, and especially if the parameter is the only element in the denomin...

más de 2 años hace | 0

| aceptada

Respondida
How to automate the plotting of numerical data contained in Excel files?
If you have R2018b or later, and each table contains data with numerical variables (excepting the first variable that is treate...

más de 2 años hace | 0

Respondida
step response but wrong answer from matlab!
f you plot the step respoonse on the same time scale, the MATLAB plot is the same. See the added fourth subplot — % Transfe...

más de 2 años hace | 0

Respondida
search for the position of a number inside a cell (cell with existence of empty rows)
Use ismember (since you have the exact values, otherwise ismembertol) and any (here using the default column orientation, dimens...

más de 2 años hace | 0

| aceptada

Respondida
Choosing initial values for fitting experimental data through fminsearch
It would help to have the data. If ‘p(2)’ is supposed to be in the range of about 1, start it near there. Nonlinear paramete...

más de 2 años hace | 0

Respondida
Read .raw file
If the file is less than 5 MB in size, use the zip function to create a .zip file for it and then upload the .zip file here. ...

más de 2 años hace | 0

| aceptada

Respondida
How to fix "Number of equations greater than number of indeterminates. Trying heuristics to reduce to square system." error.
There are a few problems you will likely want to fix. In the interim, try this — syms x(t) t m = 10; k = 160; % t = 0:...

más de 2 años hace | 0

| aceptada

Respondida
How do I color my orbits based off of Jacobi Constant?
I would use the surf function with your matrix, with 'EdgeColor','interp' and then view(0,90). The contour (and contourf) func...

más de 2 años hace | 0

| aceptada

Respondida
interpolation using 2D look up table
See if transposing all of them (use the simple transpose (.')) will work. To see the difference between meshgrid and ndgrid r...

más de 2 años hace | 0

| aceptada

Cargar más