Réponse apportée

Help with Numerical Differentiation

The error is because you have increased the number of elements in the time array x too high for the number of elements in the re...

Help with Numerical Differentiation

The error is because you have increased the number of elements in the time array x too high for the number of elements in the re...

plus de 3 ans il y a | 0

Réponse apportée

Huge plots number visualization/comparison

You can't compare 20-30 algorithms visually without it being incredibly dense and difficult to understand. You could try: 1) Ma...

Huge plots number visualization/comparison

You can't compare 20-30 algorithms visually without it being incredibly dense and difficult to understand. You could try: 1) Ma...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

my for loop doesn't seem to be working. I want to add the correct letter to a string based on the equality of two arrays. How can I make this wok?

It seems the problem is that al is a string and therefore counts as one object for MATLAB. You can remedy this by switching to a...

my for loop doesn't seem to be working. I want to add the correct letter to a string based on the equality of two arrays. How can I make this wok?

It seems the problem is that al is a string and therefore counts as one object for MATLAB. You can remedy this by switching to a...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

How to blank a grid value with a boundary file?

Use the inpolygon function to determine which points are inside the boundary you define, then replace those points which are out...

How to blank a grid value with a boundary file?

Use the inpolygon function to determine which points are inside the boundary you define, then replace those points which are out...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

Error using plot: vectors must be the same lengths

The problem is that x and y1 (and y2) are different sizes. Look at the linspace documentation - A = linspace(start,end); retu...

Error using plot: vectors must be the same lengths

The problem is that x and y1 (and y2) are different sizes. Look at the linspace documentation - A = linspace(start,end); retu...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

How to estimate state space model and designate matrix C=1 or [1, 0]?

You are able to tell ssest which canonical form you expect the output to be in using the 'Form' option. Ex: ssest(data,order,'...

How to estimate state space model and designate matrix C=1 or [1, 0]?

You are able to tell ssest which canonical form you expect the output to be in using the 'Form' option. Ex: ssest(data,order,'...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

Graph the solution of 3 different variables vs # iterations given 3 initial condition guesses on three separate graph obtained from an iterative solving while loop.

One possibility for why your charts only appear when you use point markers is what you are using for your plot data. You set i a...

Graph the solution of 3 different variables vs # iterations given 3 initial condition guesses on three separate graph obtained from an iterative solving while loop.

One possibility for why your charts only appear when you use point markers is what you are using for your plot data. You set i a...

plus de 3 ans il y a | 1

Réponse apportée

Create a surface between two sets of 3d data points

When you send matrices to the plotting command, the way that it plots depends on the orientation of those matrices % x, y, z al...

Create a surface between two sets of 3d data points

When you send matrices to the plotting command, the way that it plots depends on the orientation of those matrices % x, y, z al...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

Reorder cell array based on unique string value

If you want to find which of the rows of your string array contain specific values, you can use this: % This can also be genera...

Reorder cell array based on unique string value

If you want to find which of the rows of your string array contain specific values, you can use this: % This can also be genera...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

Defining different bounds to each variable in fmincon

The documentation for fmincon has the answer: you are allowed to pass upper and lower bounds as vectors. For example, lower_bo...

Defining different bounds to each variable in fmincon

The documentation for fmincon has the answer: you are allowed to pass upper and lower bounds as vectors. For example, lower_bo...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée

Can someone please help me stop "Index exceeds array bounds." in iteration? Any help is highly appreciated.

You're asking for elements in x1 that don't exist. If we look only at the last loop n == 8 and you are asking for x1(7), but x1 ...

Can someone please help me stop "Index exceeds array bounds." in iteration? Any help is highly appreciated.

You're asking for elements in x1 that don't exist. If we look only at the last loop n == 8 and you are asking for x1(7), but x1 ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

Non-numeric x-axis labelling?

Use xticklabels to add labels to the x-axis of a plot. plot(<plot data>) x_label_locations = [0 1 2] x_labels = {'HT','HT+1',...

Non-numeric x-axis labelling?

Use xticklabels to add labels to the x-axis of a plot. plot(<plot data>) x_label_locations = [0 1 2] x_labels = {'HT','HT+1',...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

Apply a function to a specific column of multiple matrices?

When you use element-wise multiplication with a matrix and a vector, MATLAB makes some assumptions to make the code simpler. For...

Apply a function to a specific column of multiple matrices?

When you use element-wise multiplication with a matrix and a vector, MATLAB makes some assumptions to make the code simpler. For...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

how to plot double against datetime

In the attached CSV, the time data is the same for every 100 columns or so. Because of this, MATLAB is plotting all of the event...

how to plot double against datetime

In the attached CSV, the time data is the same for every 100 columns or so. Because of this, MATLAB is plotting all of the event...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

Calculating a matrix with a variable inside

The first issue you are having is because you are telling MATLAB to expect a 1x1 answer with A(i) and then providing a 2x2 matri...

Calculating a matrix with a variable inside

The first issue you are having is because you are telling MATLAB to expect a 1x1 answer with A(i) and then providing a 2x2 matri...

plus de 3 ans il y a | 0

Réponse apportée

wrong matrix - provides 3x3 instead of 3x1

When you're multiplying matrices, you several times use element-wise multiplication instead of matrix multiplication. A = [1 2 ...

wrong matrix - provides 3x3 instead of 3x1

When you're multiplying matrices, you several times use element-wise multiplication instead of matrix multiplication. A = [1 2 ...

plus de 3 ans il y a | 0

Réponse apportée

Need to read data from text format to matlab

I was able to reproduce your error as below: A = str2num('') % An empty character vector; Result: A = [] B = str2num([]) % An ...

Need to read data from text format to matlab

I was able to reproduce your error as below: A = str2num('') % An empty character vector; Result: A = [] B = str2num([]) % An ...

plus de 3 ans il y a | 1

Réponse apportée

Finding the shortest path

After you have found the minimum value of the function, you can simply replot over the same line in a different color. The most ...

Finding the shortest path

After you have found the minimum value of the function, you can simply replot over the same line in a different color. The most ...

plus de 3 ans il y a | 0

Réponse apportée

it says the right side does not equal to the left i dont know what should i do can anyone help me pls?

If the error says "Unable to perform assignment because the left and right sides have a different number of elements" the issue ...

it says the right side does not equal to the left i dont know what should i do can anyone help me pls?

If the error says "Unable to perform assignment because the left and right sides have a different number of elements" the issue ...

plus de 3 ans il y a | 0

Réponse apportée

how to get matlab to disply zero as the last value

a,b, and h are 18x1 so you'll only get 18x1 unless you add a zero at the end. You can do that in a few ways: x(19)=0; %or x(...

how to get matlab to disply zero as the last value

a,b, and h are 18x1 so you'll only get 18x1 unless you add a zero at the end. You can do that in a few ways: x(19)=0; %or x(...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée

How can I plot coordinates up on a map?

You can use the hold command to plot two things to the same figure. imshow('map_image') hold on plot(points_of_interest_x,poi...

How can I plot coordinates up on a map?

You can use the hold command to plot two things to the same figure. imshow('map_image') hold on plot(points_of_interest_x,poi...

plus de 3 ans il y a | 1

Réponse apportée

Saving image in correct format or how do I save only image-part of the figure?

This answer by Adam Danz shows how you can remove the borders and interactive parts of the figure window. After you've done so,...

Saving image in correct format or how do I save only image-part of the figure?

This answer by Adam Danz shows how you can remove the borders and interactive parts of the figure window. After you've done so,...

plus de 3 ans il y a | 1

Réponse apportée

Index exceeds the number of array elements(3)

The error Index exceeds the number of array elements (3). This means that you are asking for an element beyond the boundaries ...

Index exceeds the number of array elements(3)

The error Index exceeds the number of array elements (3). This means that you are asking for an element beyond the boundaries ...

plus de 3 ans il y a | 0

Réponse apportée

How to supply perticular varargin entries of the 'main_function(varargin)' to a 'subfunction(varargin_new)'?

Solution When you call the original function, you do so with original_function(arg1,arg2,arg3,arg4,..) Using varargin lets ...

How to supply perticular varargin entries of the 'main_function(varargin)' to a 'subfunction(varargin_new)'?

Solution When you call the original function, you do so with original_function(arg1,arg2,arg3,arg4,..) Using varargin lets ...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée

How to import a column from an Excel file?

Since it seems that you just need to get rid of the NaN values, try using logical indexing with the isnan command. p_time = p_t...

How to import a column from an Excel file?

Since it seems that you just need to get rid of the NaN values, try using logical indexing with the isnan command. p_time = p_t...

plus de 3 ans il y a | 1

| A accepté