Answered
Why these two path strings are different? (manual string vs. pwd + fullfile)
The file separator character for the OS you have must be backslash, as you get the result of the comparison to be 0. Let's take...

2 years ago | 0

| accepted

Answered
Want to save in a selected folder
Use exportgraphics or print and specify the full path with the filename.

2 years ago | 0

| accepted

Answered
A problem caused by 'xlim' and 'axis equal'
"So, how can I use xlim([-inf inf]) and axis equal at the same time?" You can not. As I said before, atleast 1 input value to x...

2 years ago | 0

| accepted

Answered
How to calculate the sum of all neighbouring elements in a random matrix
Use conv2 - A = [ 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 ...

2 years ago | 1

| accepted

Answered
Importing open street map data through readgeotable fails
The functionality of reading .OSM files via readgeotable was introduced in R2023b. Reference - https://in.mathworks.com/help/map...

2 years ago | 0

| accepted

Answered
extracting percentages from text
Use readtable

2 years ago | 0

Answered
Index exceeds the number of array elements. Index must not exceed 1.
There was a missing element-wise division sign in the definition of f_prime_j, causing the said variable to be defined as a scal...

2 years ago | 0

| accepted

Answered
How do you search for a number in a cell array containing different length arrays?
in = {[2 5 8 9] [1 2 4 5 7 10] [3 5 6 7 8 9 10] [1 2 3 5 8 9 10] [1 2 4 6 8 9] [1 3 4 5 6 8] [1 2 4] [4 5 7 9] [1 2 5 7 10] [1 2...

2 years ago | 0

| accepted

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
The output of g(....) is a 5x1 numerical array and DX(i) is a 1x1 numerical element. And you can not assign 5x1 numerical array ...

2 years ago | 0

| accepted

Answered
How can I get the value of a and b as a real number not as matrix
solve provides the option to generate multiple outputs - syms a b eqns = [2*a^2 + 4*a - 3 - 2*b^2 - 4*b + 3 == 0,a^3 - 4*a +...

2 years ago | 1

| accepted

Answered
How to find the x value of a function given by points?
Use logical indexing - Find Array Elements That Meet a Condition Also, as you are working with floating point numbers, it would...

2 years ago | 0

| accepted

Answered
Mean of a cell array with different cell sizes?
If the data in the cell array is compatible for concatenation, concatenate them and use mean for the specific dimension - a = ...

2 years ago | 1

| accepted

Answered
Conversion to cell from double is not possible.
You need to use curly brackets, {} %% Calculate delayed states for multiple delays x_d = cell(length(tau), 1); for k = 1:leng...

2 years ago | 0

| accepted

Answered
How can I merge two arrays in adjacent cells?.
I assume that the x and y data is stored in arrays x_vertices and y_vertices respectively. C = [x_vertices(:) y_vertices(:)] H...

2 years ago | 0

Answered
How do I generate executable code from imported data?
You need to add the @(list_of_independent_variables) before the formulae. Flushmatrix = readtable('Spülmatrix2.xlsx','PreserveV...

2 years ago | 1

| accepted

Answered
A compact way to reduce, or remove, the fractional part (separated by a decimal point) of numbers in a table
Take the floor of the data. LastName = {'Paris';'London'}; Feature1 = [71.4589;69.1432]; Feature2 = [176.3458;163.9082]; T =...

2 years ago | 1

| accepted

Answered
change negative data to zero in one table in matlab
Find Array Elements That Meet your Condition and assign them to be 0.

2 years ago | 0

Answered
Extracting a vlue from a matrix using a neighboring value as a reference
If you want the value corresponding to all occurences of the maximum value in row 1 - %Input data arr = [1 2 4 10 3 10...

2 years ago | 0

| accepted

Answered
Function output variable is unrecognized
eig is a built-in function in MATLAB. And there are many other toolbox functions, with the same name. It's not a good idea to n...

2 years ago | 0

| accepted

Answered
What is the function to use to blacken a region?
patch fill area

2 years ago | 0

Answered
Variable A must be of size [6 6]. It is currently of size [7 7]. Check where the variable is assigned a value.
It seems you have made an off-by-one error - https://en.wikipedia.org/wiki/Off-by-one_error#Fencepost_error Try this - h = 25...

2 years ago | 0

Answered
how to represent when I have a process in progress?
"hi, how to display an hourglass? or similarity?" Check out waitbar. Options from FEX include - progressbar, statusbar, text p...

2 years ago | 0

| accepted

Answered
How to index two vectors together
One way is to use arrayfun() but that is just a for loop in disguise. %Bigger data vec_A = 10.*(1:1e5)+1; vec_B = vec_A+3; ...

2 years ago | 0

| accepted

Answered
Using integral to define a function
Remove the E from the integral() call, as it is not required. Refer to the documentation of integral to know more about the syn...

2 years ago | 0

| accepted

Answered
Plot a 2D graph with two x axis
Draw a line on the second axes and set its color to none. That shows up the xticks and the xticklabels. There seems to be some ...

2 years ago | 0

| accepted

Answered
Extracting data from a .fig file
There are multiple objects in the figure. You need to choose the object(s) for which you want to get the data - open('Comparai...

2 years ago | 0

| accepted

Answered
Sorting pairs into seperate matrices based on whether they are ascending or descending
Firstly, do not use built-in functions as variables (or script) names, like you have done here - diff=diff(pairs(i,:)); Sec...

2 years ago | 1

Answered
plot single vector and plot matrix
To get the same result, transpose the array and then plot. Refer to the documentation of plot to understand the behaviour of pl...

2 years ago | 0

| accepted

Answered
how to do a scatter plot with second x axes
I have modified the code related to the plotting part. The ytick labels look bold because there are two sets of them, one on to...

2 years ago | 1

| accepted

Answered
Stacked line plot legend color change
As you want to get the legend for individual chart(s) from a stackedplot of multiple tables/timetables, turn the "CollapseLegend...

2 years ago | 1

| accepted

Load more