Réponse apportée

Create a Slanted Linspace Matrix

If you have the signal processing toolbox, the buffer command will do exactly what you want. If not, something like x = linsp...

Create a Slanted Linspace Matrix

If you have the signal processing toolbox, the buffer command will do exactly what you want. If not, something like x = linsp...

presque 4 ans il y a | 0

Réponse apportée

log ticks on Y-axis

set(gca, 'YScale', 'log') Is this what you mean?

log ticks on Y-axis

set(gca, 'YScale', 'log') Is this what you mean?

presque 4 ans il y a | 0

| A accepté

Réponse apportée

error message how to solve !?

The error message is exactly what it says. You defined a function, which is not defined if one of your inputs is a function hand...

error message how to solve !?

The error message is exactly what it says. You defined a function, which is not defined if one of your inputs is a function hand...

presque 4 ans il y a | 0

Réponse apportée

MATLAB isn't working to generate figures

Use hold on and hold off when generating figures. I've not used imshow before, but I'll guess that each time you generate a figu...

MATLAB isn't working to generate figures

Use hold on and hold off when generating figures. I've not used imshow before, but I'll guess that each time you generate a figu...

presque 4 ans il y a | 0

Réponse apportée

How to add a NaN row at the beginning columns of a table?

for jj = 1:5 A(:,jj) = [NaN([jj 1]); B(1:end-jj)] A(T.id(1:end) ~= [NaN([jj 1]); T.id(1:end-jj)], jj) = NaN; end I h...

How to add a NaN row at the beginning columns of a table?

for jj = 1:5 A(:,jj) = [NaN([jj 1]); B(1:end-jj)] A(T.id(1:end) ~= [NaN([jj 1]); T.id(1:end-jj)], jj) = NaN; end I h...

presque 4 ans il y a | 1

| A accepté

Réponse apportée

signal to noise ratio (SNR)

According to the documentation, "r = snr(x,y) returns the signal-to-noise ratio (SNR) in decibels of a signal, x, by computing ...

signal to noise ratio (SNR)

According to the documentation, "r = snr(x,y) returns the signal-to-noise ratio (SNR) in decibels of a signal, x, by computing ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée

How can I get archived documentation for a R2012b release?

As per the other answer, 2012b doesn't have easily accessed documentation. I have found, however, the 2012b release notes in thi...

How can I get archived documentation for a R2012b release?

As per the other answer, 2012b doesn't have easily accessed documentation. I have found, however, the 2012b release notes in thi...

presque 4 ans il y a | 0

Réponse apportée

How to Integrate ?

Wolfram alpha is useful here to show you what can be done. If you click that link you'll see that I asked it to do which is ...

How to Integrate ?

Wolfram alpha is useful here to show you what can be done. If you click that link you'll see that I asked it to do which is ...

presque 4 ans il y a | 0

Réponse apportée

Min and max value of many results

Good news! Matlab has built in min and max commands. So it's pretty straightforward to define them and store them in a vector: ...

Min and max value of many results

Good news! Matlab has built in min and max commands. So it's pretty straightforward to define them and store them in a vector: ...

presque 4 ans il y a | 1

Question

Is it possible to include LaTeX expressions as text in my code?

I have a piece of code, where some of the variables can have their values chosen by me as and when I want. The values have very ...

presque 4 ans il y a | 2 réponses | 0

Réponse apportée

What is the difference between matlab download R2020a and R2020b?

Here are the release notes for 2020b. There likely isn't much to change for most people, when I updated from 2020a to 2020b I di...

What is the difference between matlab download R2020a and R2020b?

Here are the release notes for 2020b. There likely isn't much to change for most people, when I updated from 2020a to 2020b I di...

presque 4 ans il y a | 0

| A accepté

Réponse apportée

Index in position 1 is invalid. Array indices must be positive integers or logical values. (Slution of equation of motion with runge kutta 4)

t(1), q(1) and dqdt(1) are all zero. Matlab indexing starts at 1, so when you assign k_11 = y1_2nd(t(i),q(i),dqdt(i)) it trie...

Index in position 1 is invalid. Array indices must be positive integers or logical values. (Slution of equation of motion with runge kutta 4)

t(1), q(1) and dqdt(1) are all zero. Matlab indexing starts at 1, so when you assign k_11 = y1_2nd(t(i),q(i),dqdt(i)) it trie...

presque 4 ans il y a | 0

Réponse apportée

I want the graph of the function only show the part where x>0

You want xlim. Give it one limit and it can calculate the other, or use xlim(0, length(y)).

I want the graph of the function only show the part where x>0

You want xlim. Give it one limit and it can calculate the other, or use xlim(0, length(y)).

presque 4 ans il y a | 1

Réponse apportée

max and min row from an array

The built in min and max commands have the ability to return the index of the largest and smallest values in an array. The docum...

max and min row from an array

The built in min and max commands have the ability to return the index of the largest and smallest values in an array. The docum...

presque 4 ans il y a | 0

Réponse apportée

How to change dot's place in fractional number

Multiply by 100? x1 = 0.25; x2 = x1 * 100; disp(x2) 25

How to change dot's place in fractional number

Multiply by 100? x1 = 0.25; x2 = x1 * 100; disp(x2) 25

presque 4 ans il y a | 1

| A accepté

Question

How do I find out what specifically is causing the error "Matrix is close to singular or badly scaled" in the sgolay function?

I'm using the sgolay function from the Signal Processing toolbox to calculate some derivatives. The function is inside a loop as...

presque 4 ans il y a | 1 réponse | 0

Réponse apportée

Plot a graph with linspace

You can't get that exact plot with linspace. I've managed to get it by using t = [0 1 1 2 3]; u = [1 1 0 0 0]; plot(t, u, 'k...

Plot a graph with linspace

You can't get that exact plot with linspace. I've managed to get it by using t = [0 1 1 2 3]; u = [1 1 0 0 0]; plot(t, u, 'k...

presque 4 ans il y a | 0

| A accepté

Réponse apportée

Finding points inbetween the values of my arrays.

If I understand your question, you want the interp1 command. You can choose how many target points to create, so make the lines ...

Finding points inbetween the values of my arrays.

If I understand your question, you want the interp1 command. You can choose how many target points to create, so make the lines ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée

Curve Fitting for a function with 3 fitting parameters.

Bjorn's method will work. I'm just offering a second option, from the file exchange: https://uk.mathworks.com/matlabcentral/fil...

Curve Fitting for a function with 3 fitting parameters.

Bjorn's method will work. I'm just offering a second option, from the file exchange: https://uk.mathworks.com/matlabcentral/fil...

presque 4 ans il y a | 0

Réponse apportée

How to make a graph of an equation if part of it is an array?

You're right, the right side of line 10 has the same size as r (which itself has the same size as t), and you're trying to assig...

How to make a graph of an equation if part of it is an array?

You're right, the right side of line 10 has the same size as r (which itself has the same size as t), and you're trying to assig...

presque 4 ans il y a | 1

Réponse apportée

How to delete last characters of a string

What happens if you replace name = "Motor 315S-4" with name = 'Motor 315S-4' and try name2 = name(1:end-2)? Based off this...

How to delete last characters of a string

What happens if you replace name = "Motor 315S-4" with name = 'Motor 315S-4' and try name2 = name(1:end-2)? Based off this...

presque 4 ans il y a | 1

| A accepté

Réponse apportée

Finding multiple x values in plot for given y

I think you want fsolve. Give it a function handle and an initial starting point, and it'll tell you (approximately) what x give...

Finding multiple x values in plot for given y

I think you want fsolve. Give it a function handle and an initial starting point, and it'll tell you (approximately) what x give...

presque 4 ans il y a | 0

Réponse apportée

subtract two matrices of sizes [1*5] and [3*5]

Well I typed m = [1 2 3 4 5]; y = [10 11 12 13 14; 9 8 7 6 5; 15 16 17 18 19]; y-m into my matlab command window, and it re...

subtract two matrices of sizes [1*5] and [3*5]

Well I typed m = [1 2 3 4 5]; y = [10 11 12 13 14; 9 8 7 6 5; 15 16 17 18 19]; y-m into my matlab command window, and it re...

presque 4 ans il y a | 1

Réponse apportée

Why am I receiving the error "Array indices must be positive integers or logical values."

Line 26: Array indices must be positive integers or logical values. i is used as an index, but it isn't defined until a line lat...

Why am I receiving the error "Array indices must be positive integers or logical values."

Line 26: Array indices must be positive integers or logical values. i is used as an index, but it isn't defined until a line lat...

presque 4 ans il y a | 0

Réponse apportée

Undefined function 'mtimes' for input arguments of type 'function_handle'.

Your function fonk takes f as an input. f must be a function handle in order to satisfy the quad requirements. Later, you set h=...

Undefined function 'mtimes' for input arguments of type 'function_handle'.

Your function fonk takes f as an input. f must be a function handle in order to satisfy the quad requirements. Later, you set h=...

presque 4 ans il y a | 0

Réponse apportée

transform data from hourly to quarter hourly

https://uk.mathworks.com/help/matlab/ref/interp1.html The vector x can be datetime values.

transform data from hourly to quarter hourly

https://uk.mathworks.com/help/matlab/ref/interp1.html The vector x can be datetime values.

presque 4 ans il y a | 1

| A accepté

Réponse apportée

How do I write a sparse matrix in MATLAB

https://uk.mathworks.com/help/matlab/ref/full.html

How do I write a sparse matrix in MATLAB

https://uk.mathworks.com/help/matlab/ref/full.html

presque 4 ans il y a | 2

Réponse apportée

How to change x-axis values?

This was the top result when I googled "matlab remove scientific notation axis". From R2015b onwards, ax = gca; ax.XRuler.E...

How to change x-axis values?

This was the top result when I googled "matlab remove scientific notation axis". From R2015b onwards, ax = gca; ax.XRuler.E...

presque 4 ans il y a | 0

Réponse apportée

The way to integrate a differentiated function(微分した関数を積分する方法)

Well the integral of a derivative is simply the function itself. For example: y(x) = x^2 + x + 5 dy/dx = 2x + 1 integral(dy/d...

The way to integrate a differentiated function(微分した関数を積分する方法)

Well the integral of a derivative is simply the function itself. For example: y(x) = x^2 + x + 5 dy/dx = 2x + 1 integral(dy/d...

presque 4 ans il y a | 0

Réponse apportée

Adding noise to my data set

randn is a uniformly distributed random variable with mean of zero and standard deviation of 1. To get what you want, use vari...

Adding noise to my data set

randn is a uniformly distributed random variable with mean of zero and standard deviation of 1. To get what you want, use vari...

presque 4 ans il y a | 0

| A accepté