Réponse apportée
lsqcurvefit initial point is always a local minimum, relative first-order optimality is always = 0
I think you have a typo here: F = @(v,cur_data_wave_x) amplitude*(offset + cos(v0(1)*(cur_data_wave_x) + v0(2))); should rathe...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Applying a for loop to every column in a vector
Agree with KSSV, avoid naming as "max", but in this case it is not causing your problem. Your problem is that "index" should no...

environ 6 ans il y a | 0

Réponse apportée
How to choose 5 random rows from an array of 8 rows for 10 times and save the 10 results
if order doesn't matter (6,4,8,7,2 is the same as 4,6,8,7,2) doc nchoosek if order does matter (6,4,8,7,2 is different from 4,...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
solving a second spatial derivative using ode45
This comment is incorrect: % Create a two element vector that holds the derivative equations of u and % v % U(1) is u and U(2...

environ 6 ans il y a | 0

Réponse apportée
How to save file on chosen path in app designer?
can you just simplify and use uiputfile()?

environ 6 ans il y a | 0

Réponse apportée
Implicit Boundary Value Problem
Ok, so looks like what you are after is solving a DAE that has BCs at more than one boundary. Docs say it is ode15s and ode23t ...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Select mxm matrix from mxn matrix and solve systems of linear equations
Does this help with first problem: https://www.mathworks.com/help/matlab/ref/nchoosek.html Second problem, maybe make tolerance...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Reduce time execution in a real time serial data reading
If instead of a loop, you use a timer (https://www.mathworks.com/help/matlab/matlab_prog/use-a-matlab-timer-object.html), you mi...

environ 6 ans il y a | 0

Réponse apportée
how to generate text file from generated output
fprintf() accepts as 1st argument a file identifier for a file opened with fopen(). fid = fopen("somefile","w") fprintf(fid,...

environ 6 ans il y a | 0

Réponse apportée
App designer: Enable mouse scroll to change value on slider
Take a look at the UIFigure's following properties: WindowScrollWheelFcn WindowKeyPressFcn WindowKeyReleasedFcn If you need ...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Trying to identify directions of overlapping lines in images, at my wit's end
Have you looked into radon transforms? You might get some "signal" at the 45 and 135 directions for the right image... If these...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Comparing terms in a character array
If it is truly a "character array" and you want exact matches only, you can use the findstr() command, which will return empty i...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Web app system command
To the question: Also, an other question just came to my mind: what's the best practice to store permanent data and access them...

environ 6 ans il y a | 0

Réponse apportée
Getting data from the figure in appdesigner
Here's an example where I used the data cursor's update function itself to collect the coordinates and feed directly into your a...

environ 6 ans il y a | 2

Réponse apportée
reshaping multi dimensional array and central difference method
Based on your example lines, you seem to have the further simplification that your delta x and delta y are uniform (in your exam...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Filter a table based on date (Error using tabular/dotParenReference (line 95) Unrecognized row name '01/00/0000'.)
The second way is almost right, but when you use () on testtable, you are extracting a subtable, rather than the datetime array ...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Using a image variable from one GUI function to another in AppDesigner
Create a property for your app class to hold the image. You appear to be using appdsigner. In appdesigner's code view, on the l...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Plot a curve with its derivatives
As far as I know, matlab's plot function will draw a straight line (linear interpolation) between adjacent points. For your cas...

environ 6 ans il y a | 0

Réponse apportée
Generate matrix of precise length and in ascending order
This seems to work, and is less wasteful RowSum = 10; NCols = 4; NRows = 70000; A = randi(floor((RowSum-2)/(NCols-2)),[NRo...

environ 6 ans il y a | 0

Réponse apportée
How do i create a multi-colour histogram using excel data?
I suspect your yA, yB, yC are column vectors, which you are trying to horizontally concatenate with scalars. You can probably fi...

environ 6 ans il y a | 0

Réponse apportée
How plot a figure like this attached figure?
It's because mesh expects z-data to be actual coordinates in z, but mesh (and surf) will accept a 4th argument for color N = 50...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Using trapz doesn't work
F is of size 1x1, not 1x24000

environ 6 ans il y a | 0

Réponse apportée
Painters renderer results in jagged edges
What happens if you set "FaceColor" to "interp" (default is "flat") on the surf object? It fixes the jagge edge for me (2017a or...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Solve system of boundary value problem (a singular Jacobian encountered)
If you know the problem is solvable (HW, e.g.,), then singular Jacobian usually means something is wrong with your equations or ...

environ 6 ans il y a | 0

Réponse apportée
determining order of accuracy
This is not a matlab question but a numerical analysis problem. Since someone already generated the results for you, it's a matt...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Branching a WindowButtonDown function
If you don't mind using undocumented features, I have had success using the standard axes() object instead of uiaxes(), because ...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Proper reading of .txt
Just use readtable()? Looks like every station will have already-aggregated results (hourly vs daily for the same station, same ...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
ODE solver: how to integrate a system with a vector of parameters?
Are you just looking for solving the ODE as many times as you have different values of V? t = [0 400]; y = [0.004 0 0]; alpha...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Limiting mouseclick event to current Axes in App Designer
Cameron's idea of calculating the axes position within the figure position should work, and it is the only way with currently do...

environ 6 ans il y a | 0

Réponse apportée
How to access left bottom pixel in image using (0,0)?
If you just want to translate the unflipped image's row index to be translated into a different index as if you were indexing th...

environ 6 ans il y a | 0

Charger plus