Beantwortet
Compare rows from different columns
One approach — A = randi(50,10,2) Col_2_Larger = A(:,2) > A(:,1) ColNr = find(Col_2_Larger); fprintf('Col 2 larger in row...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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.) ...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
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 =...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 1

| akzeptiert

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

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

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

mehr als 2 Jahre vor | 0

| akzeptiert

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

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 1

| akzeptiert

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

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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+...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 3

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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. ...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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:...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Mehr laden