Answered

How can i plot this function? y=0.75/(log10(x)*2).^2

How about this? x = linspace(0.01,0.99,100); % Avoid tricky inputs like 1 y = 0.75./(log10(x)*2).^2; plot(x,y)

How can i plot this function? y=0.75/(log10(x)*2).^2

How about this? x = linspace(0.01,0.99,100); % Avoid tricky inputs like 1 y = 0.75./(log10(x)*2).^2; plot(x,y)

2 years ago | 0

Answered

Why aren't the first and last peaks detected using findpeaks()?

For vec1, the reason is that the peak is also the last data point and so is intentionally exlcuded. The findpeaks documentation...

Why aren't the first and last peaks detected using findpeaks()?

For vec1, the reason is that the peak is also the last data point and so is intentionally exlcuded. The findpeaks documentation...

2 years ago | 1

| accepted

Answered

sin(2*pi) vs sind(360)

If you ever need to compute sin(x*pi) or cos(x*pi), its better to do sinpi(x) or cospi(x). You never explicitly multily x by a ...

sin(2*pi) vs sind(360)

If you ever need to compute sin(x*pi) or cos(x*pi), its better to do sinpi(x) or cospi(x). You never explicitly multily x by a ...

2 years ago | 1

Answered

Why in matlab sin(pi) is not zero but sin(pi/2) is 1?

If you ever need to compute sin(x*pi) or cos(x*pi), its better to do sinpi(x) or cospi(x). You never explicitly multily x by a ...

Why in matlab sin(pi) is not zero but sin(pi/2) is 1?

If you ever need to compute sin(x*pi) or cos(x*pi), its better to do sinpi(x) or cospi(x). You never explicitly multily x by a ...

2 years ago | 2

Answered

Is there any concept like dictionary or hash tables in matlab like in Python?

As of R2022b, MATLAB has a new dictionary datatype An introduction to dictionaries (associative arrays) in MATLAB » The MATLAB B...

Is there any concept like dictionary or hash tables in matlab like in Python?

As of R2022b, MATLAB has a new dictionary datatype An introduction to dictionaries (associative arrays) in MATLAB » The MATLAB B...

2 years ago | 9

| accepted

Answered

How to make dictionary in Matlab

In R2022b and later, you can use the new dictionary type for this. Faster than containers.map. A tutorial-like introduction at...

How to make dictionary in Matlab

In R2022b and later, you can use the new dictionary type for this. Faster than containers.map. A tutorial-like introduction at...

2 years ago | 0

| accepted

Answered

Dictionaries of Hashtables in MATLAB?

Reviving this thread in 2022 because R2022b contains a new dictionary data type. A tutorial-like introduction at An introductio...

Dictionaries of Hashtables in MATLAB?

Reviving this thread in 2022 because R2022b contains a new dictionary data type. A tutorial-like introduction at An introductio...

2 years ago | 1

Answered

Faster alternative to containers.Map

MATLAB R2022b has a new dictionary datatype that's much faster than containers.map. A tutorial-like introduction at An introduc...

Faster alternative to containers.Map

MATLAB R2022b has a new dictionary datatype that's much faster than containers.map. A tutorial-like introduction at An introduc...

2 years ago | 0

Answered

how to remove/kill the figure produced with colormap

If the colormap is the most recent command you've executed, it will be the current figure. As such, you can use delete(gcf) W...

how to remove/kill the figure produced with colormap

If the colormap is the most recent command you've executed, it will be the current figure. As such, you can use delete(gcf) W...

2 years ago | 0

| accepted

Answered

How do I know how large an array can fit on the GPU?

As you've seen, gpuDevice() gives you information about your GPU. This is what I get for mine >> gpuDevice() ans = CUDA...

How do I know how large an array can fit on the GPU?

As you've seen, gpuDevice() gives you information about your GPU. This is what I get for mine >> gpuDevice() ans = CUDA...

2 years ago | 0

| accepted

Answered

process based parpool: keep the data in the workers

Parfor is great, it auto-parallelises for us and takes care of a lot of things like data transfer to/from workers and so on. At ...

process based parpool: keep the data in the workers

Parfor is great, it auto-parallelises for us and takes care of a lot of things like data transfer to/from workers and so on. At ...

2 years ago | 0

Answered

using matlab compiler to read a .mat file at run time

You can tell the compiler to exclude things using an Exclude pragma A demo: I created a .mat file as follows myvar = 1; save(...

using matlab compiler to read a .mat file at run time

You can tell the compiler to exclude things using an Exclude pragma A demo: I created a .mat file as follows myvar = 1; save(...

2 years ago | 1

| accepted

Answered

Is MATLAB supported on Apple Silicon Macs?

Blog post on this topic at Exploring the MATLAB beta for Native Apple Silicon » The MATLAB Blog - MATLAB & Simulink (mathworks.c...

Is MATLAB supported on Apple Silicon Macs?

Blog post on this topic at Exploring the MATLAB beta for Native Apple Silicon » The MATLAB Blog - MATLAB & Simulink (mathworks.c...

2 years ago | 1

Answered

Anderson Darling Goodness-of-the-fit test?

The statistics toolbox has an adtest function. It can test against a specific distribution with known parameters, or a more gene...

Anderson Darling Goodness-of-the-fit test?

The statistics toolbox has an adtest function. It can test against a specific distribution with known parameters, or a more gene...

2 years ago | 1

| accepted

Answered

Using Parfor for solving ODE via numerical methods (Euler)

As others have said, you cannot parallelise this loop. However, what you can do is parallelise independent runs of this loop. ...

Using Parfor for solving ODE via numerical methods (Euler)

As others have said, you cannot parallelise this loop. However, what you can do is parallelise independent runs of this loop. ...

2 years ago | 1

Answered

OCR on a screenshot

Hi Paolo Just because I am MathWorks staff doesn't mean anything here because until right now I've never used MATLAB's ocr func...

OCR on a screenshot

Hi Paolo Just because I am MathWorks staff doesn't mean anything here because until right now I've never used MATLAB's ocr func...

2 years ago | 2

| accepted

Answered

i dont get why it says Unrecognized function or variable 'Nbin when i run it

It's because you have this line [count,center]=hist(x,Nbin); Nbin needs to be defined as the number of bins you want in the hi...

i dont get why it says Unrecognized function or variable 'Nbin when i run it

It's because you have this line [count,center]=hist(x,Nbin); Nbin needs to be defined as the number of bins you want in the hi...

2 years ago | 0

Answered

I would like to plot two bar charts side by side using separate y-axis for each corresponding plot.

Try tilledlayout. Documented at Create tiled chart layout - MATLAB tiledlayout (mathworks.com) % I want one row of plots with...

I would like to plot two bar charts side by side using separate y-axis for each corresponding plot.

Try tilledlayout. Documented at Create tiled chart layout - MATLAB tiledlayout (mathworks.com) % I want one row of plots with...

2 years ago | 0

| accepted

Answered

arrayfun doesn't work with rmoutliers

arrayfun operates on every element of the array. So arrayfun(@rmoutliers,A,"UniformOutput",false) is like doing rmoutliers(0...

arrayfun doesn't work with rmoutliers

arrayfun operates on every element of the array. So arrayfun(@rmoutliers,A,"UniformOutput",false) is like doing rmoutliers(0...

2 years ago | 0

Answered

variables cannot be saved in matlab

This looks like an operating system error. In particular, you are trying to write to a folder where you don't have write permis...

variables cannot be saved in matlab

This looks like an operating system error. In particular, you are trying to write to a folder where you don't have write permis...

2 years ago | 0

| accepted

Answered

Values are getting updated every 15 seconds in thingspeak. How do I lower this time?

I guess you are using the free tier of thingspeak which is limited to one update every 15 seconds. For faster updates, you'll n...

Values are getting updated every 15 seconds in thingspeak. How do I lower this time?

I guess you are using the free tier of thingspeak which is limited to one update every 15 seconds. For faster updates, you'll n...

3 years ago | 2

| accepted

Answered

Double Integration error using /

You need to vectorise your equation alpha = 1.0; inte = @(y,x) (cos(x).^2)./(1 + alpha./(cos(x).*sqrt(1 - 1./y.^2))).^2.*(1./...

Double Integration error using /

You need to vectorise your equation alpha = 1.0; inte = @(y,x) (cos(x).^2)./(1 + alpha./(cos(x).*sqrt(1 - 1./y.^2))).^2.*(1./...

3 years ago | 1

Answered

fsolve gives the same value for different parameters of the nonlinear equation

It seems that chaging the paramet C_TIC from 0 to 2.78 doesn't affect the outpur much. I changed your function slightly so that...

fsolve gives the same value for different parameters of the nonlinear equation

It seems that chaging the paramet C_TIC from 0 to 2.78 doesn't affect the outpur much. I changed your function slightly so that...

3 years ago | 0

Answered

Converting MATLAB code into python code

Hi Aakash To get this running on a HPC system, it would be beneficial to know the details of the HPC system. As I said in my co...

Converting MATLAB code into python code

Hi Aakash To get this running on a HPC system, it would be beneficial to know the details of the HPC system. As I said in my co...

3 years ago | 11

| accepted

Answered

What is the difference between lu() and decomposition([],'lu')?

The two output form of lu() does use a different algorithm compared to the decomposition object. Also, it is not possible to sa...

What is the difference between lu() and decomposition([],'lu')?

The two output form of lu() does use a different algorithm compared to the decomposition object. Also, it is not possible to sa...

3 years ago | 0

| accepted

Answered

Zero elements in a matrix more higher than ones (MATLAB)

This is almost certainly not the most efficient way of doing it but it seems to work. Will need the statistics and ML toolbox f...

Zero elements in a matrix more higher than ones (MATLAB)

This is almost certainly not the most efficient way of doing it but it seems to work. Will need the statistics and ML toolbox f...

3 years ago | 0

| accepted

Answered

Different results compared to hand calculation?

I don't know the algorithm you are implementing but I can see some things in your code that look strange to me and can explain w...

Different results compared to hand calculation?

I don't know the algorithm you are implementing but I can see some things in your code that look strange to me and can explain w...

3 years ago | 0

| accepted

Answered

R = rotx(ang), roty(ang), rotz(ang) is not working in my MATLAB.

As Scott mentioned, these are in Phase Array Toolbox. Since you have access to it on MATLAB Online, it must be included in your...

R = rotx(ang), roty(ang), rotz(ang) is not working in my MATLAB.

As Scott mentioned, these are in Phase Array Toolbox. Since you have access to it on MATLAB Online, it must be included in your...

3 years ago | 1

| accepted

Answered

Is there any implementation for Mask R-CNN in Matlab?

There's an example on the MathWorks GitHub site matlab-deep-learning/mask-rcnn: Mask-RCNN training and prediction in MATLAB for ...

Is there any implementation for Mask R-CNN in Matlab?

There's an example on the MathWorks GitHub site matlab-deep-learning/mask-rcnn: Mask-RCNN training and prediction in MATLAB for ...

3 years ago | 1

Answered

is matlab production server included in education license

Update from the year 2021: MATLAB Prodction Server is now included in Campus-Wide Licenses (used to be called TAH license).

is matlab production server included in education license

Update from the year 2021: MATLAB Prodction Server is now included in Campus-Wide Licenses (used to be called TAH license).

3 years ago | 0