How to fix a program that does not end?
You are increasing your loop variable inside the loop: l=l+1; Is that intentional? What are you trying to achieve there? That ...

27 giorni ago | 0

If else problem for year
You can do this two ways: Option 1 is to do the actual work. Is the input correct? Does the month entered actually have at leas...

circa un mese ago | 0

Select 100 points either side from mouse click cooradinates
Use the x-coordinate returned by getpts to select the data. x=linspace(0,10,1000); %generate a smooth random curve y=sin(x)+p...

circa un mese ago | 0

Problem in coordinate conversion
This behavior is as documented. The result is in the [-pi pi] radians range. If you want to have your angles in the range [0 360...

circa un mese ago | 0

There is a mistake with such expressions as mod(23^12,24). MATLAB gives an answer of 0 which, given that 23 and 24 are relative primes,
The number you're trying to process is larger than flintmax(), so you can rely on single digit precision operations.

circa un mese ago | 0

Is there an equivalent function in Matlab 2019 to the earlier version's isunicode function?
The isunicode function may look promissing, but doesn't actually work on my test files (generated with Notepad++). The same prob...

circa un mese ago | 1

How replace matching string
Because your second and third condition can be merged, you can use ismember: data={'Pass','Pass{overflow :1,unbound:5,warning:9...

circa un mese ago | 1

Convolution of absolute magnitude =/= absolute magnitude of convolution?
Let's consider a minimal example: data=[-3 0 3]; kernel=[1 1 1]/3; Now it is easy to see that convolving first and then takin...

circa un mese ago | 0

| accepted

Creating a for loop to see if date exists
If you insist or keeping it as a double, you can use ismember three times, but it makes more sense to make use of the datetime c...

circa un mese ago | 0

| accepted

Variable is in a function file, how do I use a loop to change the value of this variable?
According to the doc you can pass extra parameters by setting an anonymous function. I see no indication in the R2014a doc that ...

circa un mese ago | 0

Title for a figure containing many pictures
You can also use the suptitle function. I remember it as being a native Matlab function, but I couldn't find it in the doc. You ...

circa un mese ago | 0

hi every one , how can i do a for cycle with diffrent vector length , thank you
You can put them in a cell array and let cell2mat handle the removal of empty elements. I have no clue what you want to do with ...

circa un mese ago | 0

| accepted

Name variables according to string
Why not store them in a struct array? If all mat files have the same fields that should work very well.

circa un mese ago | 0

| accepted

could anyone help me to solve the issue
This removes elements until your matrix is no longer valid according to your rule. It is very slow for bigger matrices, but it i...

circa un mese ago | 0

| accepted

How to take R-Square value as a variable
If you mean you want to access the value of the rsquare field, you can do that as with any struct (see the line of code below). ...

circa un mese ago | 0

| accepted

matlab piece wise function
That is a good idea of solving your problem. There is one thing you're forgetting in your logic: to trim the parts you don't nee...

circa un mese ago | 0

You'll have to choose R2015b or earlier. That is the latest version where there is a 32 bit version. If you need a newer version...

circa un mese ago | 1

Remove rows based on length of column value
Instead of implicit expansion (which can take a lot of memory for bigger arrays), you can use histogram counts: S=load('practic...

circa un mese ago | 0

| accepted

Can anyone help me with the error?
You aren't plotting a function, but a vector. Replace fplot by plot, or replace your input by a function. Actually, doing both w...

circa 2 mesi ago | 1

| accepted

How to calculate accuracy from confusion matrix?
Accuracy = (TP+TN)/(TP+TN+FP+FN) where: TP = True positive; FP = False positive; TN = True negative; FN = False negative A...

circa 2 mesi ago | 0

Could anyone help me how to solve the following issue.
I can't think of a better solution, but you could try brute-forcing it with a while loop: maxval=5;cols=10; if maxval>cols ...

circa 2 mesi ago | 0

| accepted

extracting data from hex
You should only remove the leading 0x as that indicates the data is hexadecimal. data_hex={{'0x0000D830'} {'0x000103EA'} ...

circa 2 mesi ago | 0

customised x data in matlab plot
The XTick property requires a vector with numeric data, but the XTickLabel property requires a cell array. labels = [0 2000 400...

circa 2 mesi ago | 0

| accepted

How to create a function which accepts a name of a mat-file and returns a structure array with fieldsâ€™ Name and Size?

circa 2 mesi ago | 1

| accepted

How can I append same size matrix vertically?
Nothing here is happening automatically. With the comma you are telling Matlab that you want to concatenate horizontally. If you...

circa 2 mesi ago | 1

How to find the indices of a data column that aren't Nan, and how to use those indices to concatenate a vector?
The not function (or simply ~) doesn't have a second output. Luckily you don't need it. You can directly use its output to perfo...

circa 2 mesi ago | 0

| accepted

How to read images from one directory into variables using loop?
You don't want numbered variables. Try a cell array instead. That way you can much more easily loop through your images to do th...

circa 2 mesi ago | 0

Do I need to reference matlab in an academic paper?
That depends a bit on the context and the journal. You can ask your supervisor what they think. Personally I also do some parts ...

circa 2 mesi ago | 0

how to get image from specific folder and resize each image and save them is a new folder
This is how you can provide the full path to imread: for K = 1 : length(dinfo) thisimage = dinfo(K).name; Img = imread(...

circa 2 mesi ago | 0