Réponse apportée
Need to read some values from a text file
This process consists of multiple steps: read the file to a cellstr or to a string vector (you can use readlines on newer relea...

plus de 4 ans il y a | 0

Réponse apportée
I have an error I got from using fsolve but I do not understand why.
You have this in func_2: x(3). That means the x you're passing should be at least 3 elements long. X = fsolve(@(x) FUNC(x), [0 ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to make mat lib(mat.h , matrix.h, etc...) compatible for the linux platform?
Including mex.h is generally enough to provide the interface with Matlab in my experience. You may need to include stdint.c as w...

plus de 4 ans il y a | 0

Réponse apportée
Add zero decimal digits in order to have all the elements of a matrix with same number of decimal digits
There is a distinction between the way data is stored and how it is displayed. You can change the data type (double, single,...

plus de 4 ans il y a | 1

Réponse apportée
Can anyone tell me how to communicate a value of variable from a for loop to another for loop
Why would you need to do this? If both loops should share variables, why aren't they a single loop? Other than that, you can ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Boxchart - How can we change the whisker length?
I doubt you can actually access this property. It is at the very least undocumented. You will either have to use boxplot or bui...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How can I minimize a function of functions?
You can probably do it with the symbolic toolbox as well, but below is a numerical solution. y1 =@(x1,x2) x1^2 + x2; y2 =@(x1,...

plus de 4 ans il y a | 2

| A accepté

Réponse apportée
Including masking condition (NaN assignment) in anonymous function definition
0/0 You can use this to your advantage: [X,Y] = meshgrid(-6:.1:6) ; [T,R] = cart2pol(X,Y) ; NaN_if_true_one_if_false=@(tf)...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Can I set favorite toolboxes in my MathWorks account?
In the root folder of the installer you will find installer_input.txt. That file will contain instructions about how to use it. ...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Matrix Multiplication with Trigonometric Functions
The solution is in the error message: in Matlab you need to explicitly use the * operator. In mathematical notation you can gene...

plus de 4 ans il y a | 1

Réponse apportée
why is my code not working for a particular set of input?
Your code doesn't support array inputs. The easy way to deal with this is what I outline below. Note that this is not the optim...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to compare strings to other strings in the same array which contains regular digits
If the digits are the same, then the strings will be the same as well. So why not use strcmp? strcmp('F1_G2_C3','F1_G2_C3') Or...

plus de 4 ans il y a | 0

Réponse apportée
Is it possibile to use a p-file in Matlab Mobile?
As far as I'm aware, Matlab mobile is only a portal into Matlab online. So if you can use that p-file there your should be able ...

plus de 4 ans il y a | 0

Réponse apportée
logical operation with categorical data
This depends a bit on your source data, but you should look at the ismember function. Especially when combined with any, it real...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
why is my difference image black?...
Posted after a now-deleted comment: @Matt J @Marcel Kreuzberg Thank you so much i didnt notice that error. It works well now

plus de 4 ans il y a | 0

Réponse apportée
how to take average of each column of matrices
It sounds like you want something like this: A = randi(9,[6 3 6]); U = 3:5; % do it with a loop M = zeros(size(A,1),size(A,2...

plus de 4 ans il y a | 0

Réponse apportée
How to load and import a .mat file?
As the documentation explains, using load with output arguments will return a struct. help load So what you need to do is load...

plus de 4 ans il y a | 1

Réponse apportée
GUI - Error when trying to program the second slide bar for the upper limit for variable hue in image processing (lower limit succeeded)
Your syntax doesn't match up. In your callback definition you have only 3 inputs, but your function assumes 4. I would suggest s...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Passing multiple function handles to fminimax
You will have to create a wrapper that calls the functions in your cell array and returns the result as a vector. Something l...

plus de 4 ans il y a | 1

Réponse apportée
Plot with dot notation as an updating variable
You painted yourself in a corner when you decided to store data in variable names. However, you can still use your mat files. Yo...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
matlab coding how to do this?
doc input doc if

plus de 4 ans il y a | 0

Réponse apportée
Problem in calculating 30th percentile
Write a function that calculates the 30th percentile for a vector. Then provide the handle to that function to splitapply. Th...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
On the app designer, how can i log data in real time to a .mat/.txt file
This sounds like you could solve it by using one of the append flags when using fopen. Then you can fprintf what you need to wri...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Loading multiple data folders and call them in a For Loop
Your mistake was in your naming of the variables. If you can guarantee they are always integers, you can do something like this ...

plus de 4 ans il y a | 0

Réponse apportée
find, change and plot a txt file
Break it up into tasks you either know how to do, or for which you can google a solution. So first: how can you read a text fil...

plus de 4 ans il y a | 0

Réponse apportée
How can I change the upper case letters in a string to lowercase while also changing the lowercase letters to uppercase?
No need for a loop. There are three 'types' of characters that are potentially in your string: Upper case characters Lower ca...

plus de 4 ans il y a | 0

Réponse apportée
How to change format time to GPS week, GPS seconds?
The start date of this GPS epoch is probably on Wikipedia. You can simply subtract that date from your date. Then you calculate...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Bunch of Errors with Matlab GUI
GUIDE is infamous form auto-generating a lot of bloat. Let's first remove all that (and the init function, since that is the sam...

plus de 4 ans il y a | 0

Réponse apportée
Marker edges, line width and legend
Or you use a line object without any points to get the legend entry you want: xx=linspace(0,12); plot(xx,sin(xx),'LineStyle','...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Can I use a variable name to make logical comparison?
You could use the string datatype (as Chunru suggested), or use a cellstr (a cell array of char vectors): %month = input('Enter...

plus de 4 ans il y a | 1

Charger plus