Answered

I am not getting the correct answer when using datetime function

You are using t = datetime(Y,M,D) Year = 1 month = 43100 day = 1 That is not what you intend I assume. I think you...

I am not getting the correct answer when using datetime function

You are using t = datetime(Y,M,D) Year = 1 month = 43100 day = 1 That is not what you intend I assume. I think you...

4 dagar ago | 1

Answered

Find specific date/time from a series of datenums

It looks like the start of your approach is reasonable. Once you make a “times” array, there is no need to add it back to the “D...

Find specific date/time from a series of datenums

It looks like the start of your approach is reasonable. Once you make a “times” array, there is no need to add it back to the “D...

4 dagar ago | 0

Answered

Is it possible to convert code written in the Matlab language into a Simulink block diagram?(Edited)

You can put all your code into a custom Simulink block: https://www.mathworks.com/help/simulink/ug/tutorial-creating-a-custom-b...

Is it possible to convert code written in the Matlab language into a Simulink block diagram?(Edited)

You can put all your code into a custom Simulink block: https://www.mathworks.com/help/simulink/ug/tutorial-creating-a-custom-b...

4 dagar ago | 0

Answered

distance from us location to canada border

I don’t know of a direct function to measure distance from a country, but I did need to do something very similar. This is how I...

distance from us location to canada border

I don’t know of a direct function to measure distance from a country, but I did need to do something very similar. This is how I...

4 dagar ago | 0

Answered

for loop and matrix

use nchoosek to get all the pairs: Loudness=[2.79;3.16;3.71;2.29;2.49;2.64;2.9;2.79;2.91;3.35]; FlucStr=[0.0256;0.0277;0.031...

for loop and matrix

use nchoosek to get all the pairs: Loudness=[2.79;3.16;3.71;2.29;2.49;2.64;2.9;2.79;2.91;3.35]; FlucStr=[0.0256;0.0277;0.031...

10 dagar ago | 1

| accepted

Answered

Retain Image details in Matlab

This answer suggests a method that may work for you

Retain Image details in Matlab

This answer suggests a method that may work for you

11 dagar ago | 0

Answered

how can i convert program written in c code to matlab?

I’ve had a lot of luck translating C code line by line. After I get that working, I go back and hand optimize the code (Loop in ...

how can i convert program written in c code to matlab?

I’ve had a lot of luck translating C code line by line. After I get that working, I go back and hand optimize the code (Loop in ...

11 dagar ago | 0

Answered

Need help converting matrix of i2s values to sound

You could try to use the audioplayer function. You would need to scale your data, and know the sample frequency. You code ...

Need help converting matrix of i2s values to sound

You could try to use the audioplayer function. You would need to scale your data, and know the sample frequency. You code ...

11 dagar ago | 0

Answered

Exceeds array bounds Error when running m-file, but no problem if the function is run alone.

I suspect your problem has to do with using different matrix named switchdata. Many people feel that is best to avoid using glob...

Exceeds array bounds Error when running m-file, but no problem if the function is run alone.

I suspect your problem has to do with using different matrix named switchdata. Many people feel that is best to avoid using glob...

11 dagar ago | 0

| accepted

Answered

Variables Not Showing in Workspace After Clearing/Workspace Won't Update Varaibles

You should be able to type a variable name into the command window, and have it display the value, or open a variable from works...

Variables Not Showing in Workspace After Clearing/Workspace Won't Update Varaibles

You should be able to type a variable name into the command window, and have it display the value, or open a variable from works...

11 dagar ago | 1

Answered

How to make a program that conver a numer to binary, decimal, hexadecimal and octal.

There are built in matlab funtions that will do this conversion for you. Check out: https://www.mathworks.com/help/matlab/ref...

How to make a program that conver a numer to binary, decimal, hexadecimal and octal.

There are built in matlab funtions that will do this conversion for you. Check out: https://www.mathworks.com/help/matlab/ref...

11 dagar ago | 0

Answered

Find series of maxima of array (and matrix) within blocks of size n

You could use rehsape and max: [reshape(max(reshape(A',5,[])), [], size(A,1))]' Test: A=[1 2 5 1 0 0 5 0 1 2 4 0 5 3 2 0 ...

Find series of maxima of array (and matrix) within blocks of size n

You could use rehsape and max: [reshape(max(reshape(A',5,[])), [], size(A,1))]' Test: A=[1 2 5 1 0 0 5 0 1 2 4 0 5 3 2 0 ...

22 dagar ago | 1

| accepted

Question

Call function by path or namespace?

I have a package that was given to me that has some functions that have the same name as built in MATLAB functions, preventing m...

23 dagar ago | 3 answers | 1

Answered

Where can I find a replication of "The European Unemployment Dilemma" (Ljungqvist and Sargent, 1998)?

http://scholar.google.com/scholar?q=The+European+Unemployment+Dilemma%22+(Ljungqvist+and+Sargent,+1998)&hl=en&as_sdt=0&as_vis=...

Where can I find a replication of "The European Unemployment Dilemma" (Ljungqvist and Sargent, 1998)?

http://scholar.google.com/scholar?q=The+European+Unemployment+Dilemma%22+(Ljungqvist+and+Sargent,+1998)&hl=en&as_sdt=0&as_vis=...

23 dagar ago | 0

Answered

Why not just use Rectangular window for filtering?

More or less, the sudden start and stops can cause unexpected results, such as higher side lobes. Depending on your application,...

Why not just use Rectangular window for filtering?

More or less, the sudden start and stops can cause unexpected results, such as higher side lobes. Depending on your application,...

23 dagar ago | 0

Answered

how can i make a live data stream received and recorded from a sensor more time efficient?

1) To only plot the last 500 points, you could plot use: set(linePlot(i),'xData',t(end-500:end),'ydata',dataPlot(i,end-500:end)...

how can i make a live data stream received and recorded from a sensor more time efficient?

1) To only plot the last 500 points, you could plot use: set(linePlot(i),'xData',t(end-500:end),'ydata',dataPlot(i,end-500:end)...

23 dagar ago | 0

| accepted

Answered

Ignore anomalies in data sets

Do you have a rule that you can apply to define when a value should be ignored? (Above a certain value? distance from previous/n...

Ignore anomalies in data sets

Do you have a rule that you can apply to define when a value should be ignored? (Above a certain value? distance from previous/n...

24 dagar ago | 0

| accepted

Answered

How to sample 1 Hz analog input with different sampling frequency like 2,4,6,8,Hz

The matlab function resample will do this. https://www.mathworks.com/help/signal/ref/resample.html

How to sample 1 Hz analog input with different sampling frequency like 2,4,6,8,Hz

The matlab function resample will do this. https://www.mathworks.com/help/signal/ref/resample.html

26 dagar ago | 0

Answered

error for equality of default

Look at your code above this line for the true error.

error for equality of default

Look at your code above this line for the true error.

26 dagar ago | 0

| accepted

Answered

Numerical errors of basic multiple

These are floating point calculations. Not every number can be represented, and this rounding error can compound when you do mat...

Numerical errors of basic multiple

These are floating point calculations. Not every number can be represented, and this rounding error can compound when you do mat...

26 dagar ago | 2

| accepted

Answered

Problem in plotting the string variable

Matlab only labels tick marks that exist (about every 5 "units" in this case). Make to make the ticks every mark, use the xTick ...

Problem in plotting the string variable

Matlab only labels tick marks that exist (about every 5 "units" in this case). Make to make the ticks every mark, use the xTick ...

26 dagar ago | 0

Answered

How can I get rid of the white lines caused due to rendering issues?

There is a tool to clean this up: https://github.com/Conclusio/matlab-epsclean See discussion about this issue here: https...

How can I get rid of the white lines caused due to rendering issues?

There is a tool to clean this up: https://github.com/Conclusio/matlab-epsclean See discussion about this issue here: https...

29 dagar ago | 1

Answered

ERROR using plot. Vectors must be same lenght.

you appear to have two errors on that plot line: 1) ab_sym is a symbolic expression - did you mean to exclude this? 2) what ...

ERROR using plot. Vectors must be same lenght.

you appear to have two errors on that plot line: 1) ab_sym is a symbolic expression - did you mean to exclude this? 2) what ...

29 dagar ago | 0

| accepted

Answered

Removing invalid results knowing the trend

From what you say, it sounds like your valid rule is that if the reported angle is invalid if it is less than the previous value...

Removing invalid results knowing the trend

From what you say, it sounds like your valid rule is that if the reported angle is invalid if it is less than the previous value...

29 dagar ago | 0

| accepted

Answered

running matrix in a loop to produce another matrix

This code will loop over each row of Z and put the results into w. I'm not sure what you want to do with each row. z = [1 1 ...

running matrix in a loop to produce another matrix

This code will loop over each row of Z and put the results into w. I'm not sure what you want to do with each row. z = [1 1 ...

29 dagar ago | 0

| accepted

Answered

Plotting geo track over a map

you can use plotm to plot lat,long data onto a map axis. But there is a file exchange file that is optimized for plotting data ...

Plotting geo track over a map

you can use plotm to plot lat,long data onto a map axis. But there is a file exchange file that is optimized for plotting data ...

ungefär en månad ago | 0

Answered

Using maximum of optimisation variable as an upper bound for another variable

you can do a bounded obtimization using this file from filecentral: fminsearchbnd

Using maximum of optimisation variable as an upper bound for another variable

you can do a bounded obtimization using this file from filecentral: fminsearchbnd

ungefär en månad ago | 0

Answered

extraction of text region in an image

Matlab OCR does this See: OCR ref

extraction of text region in an image

Matlab OCR does this See: OCR ref

ungefär en månad ago | 0

Answered

ODE Error: "Array indices must be positive integers or logical values"

You are calling bdipuniodefun(t,s) with s having values of 0 (values from icv). Your program then attempts to index to the "0" e...

ODE Error: "Array indices must be positive integers or logical values"

You are calling bdipuniodefun(t,s) with s having values of 0 (values from icv). Your program then attempts to index to the "0" e...

ungefär en månad ago | 0

Answered

I want to solve multivariable equation

This is how you would sove this: syms x y r a b eqn =(x/y*((1+(r-1)/2*y^2)/(1+(r-1)/2*x^2))^((r+1)/2*(r-1))) == a/b sol...

I want to solve multivariable equation

This is how you would sove this: syms x y r a b eqn =(x/y*((1+(r-1)/2*y^2)/(1+(r-1)/2*x^2))^((r+1)/2*(r-1))) == a/b sol...

ungefär en månad ago | 0