44,628 total contributions since 2011

I do not do free private consulting. If you want to bring my attention to something, send a link to the MATLAB Answers location.

Answered

Chaotic bit stream cipher

Logicists maps can be used for this purposes, as they only need to know the current state. "cat map" on the other hand requires...

Chaotic bit stream cipher

Logicists maps can be used for this purposes, as they only need to know the current state. "cat map" on the other hand requires...

2 hours ago | 0

Answered

Which interpolation method is best?

Use https://www.mathworks.com/help/matlab/ref/fillmissing.html#bva1z1c-method fillmissing() -- it supports all of the methods yo...

Which interpolation method is best?

Use https://www.mathworks.com/help/matlab/ref/fillmissing.html#bva1z1c-method fillmissing() -- it supports all of the methods yo...

2 hours ago | 0

Answered

How to read and process a text file?

S = fileread('sample.txt'); S = regexprep(S, {'^\$.*?\n', '\r'}, {'', ''}, 'lineanchors'); all_ids = string(regexp(S, '^\S*', ...

How to read and process a text file?

S = fileread('sample.txt'); S = regexprep(S, {'^\$.*?\n', '\r'}, {'', ''}, 'lineanchors'); all_ids = string(regexp(S, '^\S*', ...

2 hours ago | 0

Answered

Every time during the starting of MATLAB these two warnings pop up?

https://www.mathworks.com/matlabcentral/answers/472134-gtk-message-10-32-31-466-failed-to-load-module-canberra-gtk-module

Every time during the starting of MATLAB these two warnings pop up?

https://www.mathworks.com/matlabcentral/answers/472134-gtk-message-10-32-31-466-failed-to-load-module-canberra-gtk-module

14 hours ago | 0

Answered

jetson function package not found

https://www.mathworks.com/help/supportpkg/nvidia/ref/jetson.jetson.html GPU Coder Support For Nvidia GPU is the required supp...

jetson function package not found

https://www.mathworks.com/help/supportpkg/nvidia/ref/jetson.jetson.html GPU Coder Support For Nvidia GPU is the required supp...

14 hours ago | 0

Answered

Multiple print outside of loop

Your c is a vector because of the rand(100, 1) None of the code is expecting a vector for c. Note that if you are trying t...

Multiple print outside of loop

Your c is a vector because of the rand(100, 1) None of the code is expecting a vector for c. Note that if you are trying t...

15 hours ago | 0

| accepted

Answered

my code doesnt show a graph even if i use the plot command

sinoaz=-23.45*(pi/180)*cos(((2*pi)/365)*(10+n)); Should use n_days instead of n A=asind(sinAz); Should be A(...

my code doesnt show a graph even if i use the plot command

sinoaz=-23.45*(pi/180)*cos(((2*pi)/365)*(10+n)); Should use n_days instead of n A=asind(sinAz); Should be A(...

15 hours ago | 0

Answered

Image Write in Excel

https://answers.microsoft.com/en-us/msoffice/forum/all/what-is-the-maximum-number-of-columns-in-a/5a053135-4865-e011-8dfc-68b599...

Image Write in Excel

https://answers.microsoft.com/en-us/msoffice/forum/all/what-is-the-maximum-number-of-columns-in-a/5a053135-4865-e011-8dfc-68b599...

16 hours ago | 0

Answered

coswm should have a 1x365 dimension, but its dimension is 1x1, what am i doing wrong?

The / operator is Matrix Right Divide, which is least squares fitting effectively. If you did not intend to do fitting at that p...

coswm should have a 1x365 dimension, but its dimension is 1x1, what am i doing wrong?

The / operator is Matrix Right Divide, which is least squares fitting effectively. If you did not intend to do fitting at that p...

18 hours ago | 0

| accepted

Answered

How can I know if my laptop is plugged into AC power via Matlab?

<https://stackoverflow.com/questions/21249419/how-do-i-programatically-detect-if-my-laptop-is-plugged-in-or-not-osx> You can ...

How can I know if my laptop is plugged into AC power via Matlab?

<https://stackoverflow.com/questions/21249419/how-do-i-programatically-detect-if-my-laptop-is-plugged-in-or-not-osx> You can ...

19 hours ago | 0

Answered

I have MatlabR2019b and I am trying to do a simple plot. I am not able to plot anything unless I use scatter(x,y) or area(x,y). How could I get plot(x,y) to work? I am using a Mac.

You need to rename plot.m in the untitled folder directory as it is overriding the Mathworks plot call

I have MatlabR2019b and I am trying to do a simple plot. I am not able to plot anything unless I use scatter(x,y) or area(x,y). How could I get plot(x,y) to work? I am using a Mac.

You need to rename plot.m in the untitled folder directory as it is overriding the Mathworks plot call

1 day ago | 1

| accepted

Answered

Error Message Using ODE45

The part starting from [t,y] = ode45(@vdp1,[0 20],[2; 0]); plot(t,y(:,1),'-o',t,y(:,2),'-o') Should be in a differen...

Error Message Using ODE45

The part starting from [t,y] = ode45(@vdp1,[0 20],[2; 0]); plot(t,y(:,1),'-o',t,y(:,2),'-o') Should be in a differen...

2 days ago | 0

Answered

fsolve to solve 5th order polynomial

You have an equation of the form A=B. Subtract B from both sides giving an equation of the form (A) - (B) = 0. Now you can fsolv...

fsolve to solve 5th order polynomial

You have an equation of the form A=B. Subtract B from both sides giving an equation of the form (A) - (B) = 0. Now you can fsolv...

2 days ago | 1

Answered

How to convert a grey-scale image into a reverse binary image

Rbin = YourImage <= 42;

How to convert a grey-scale image into a reverse binary image

Rbin = YourImage <= 42;

2 days ago | 0

| accepted

Answered

Using timer, How can I cleanly exit a function execution, when the timer fires in MATLAB?

There are only four ways in MATLAB to force a function to stop executing without its cooperation: quit MATLAB force an out-of-...

Using timer, How can I cleanly exit a function execution, when the timer fires in MATLAB?

There are only four ways in MATLAB to force a function to stop executing without its cooperation: quit MATLAB force an out-of-...

2 days ago | 0

Answered

Getting a empty sym 0x1 error when I run this code

[dP,dVg,dVf,dTf,dTg] = solve([eq1,eq2,eq3,eq4,eq5],[dP,dVg,dVf,dTf,dTg])

Getting a empty sym 0x1 error when I run this code

[dP,dVg,dVf,dTf,dTg] = solve([eq1,eq2,eq3,eq4,eq5],[dP,dVg,dVf,dTf,dTg])

2 days ago | 0

Answered

Treating input arguments (not paying attention to order of number)

Use name/value pairs, unless there is something inside of the structs that identifies which kind of object it is for, or some ot...

Treating input arguments (not paying attention to order of number)

Use name/value pairs, unless there is something inside of the structs that identifies which kind of object it is for, or some ot...

2 days ago | 0

| accepted

Answered

Problem in text to plot ....

for i = 1:cycles i starts at 1 normal = -[Mf{i}(round(cutoff*length(Mf{i-1})):round((1-cutoff)*length(Mf{i-1})),3); Mf...

Problem in text to plot ....

for i = 1:cycles i starts at 1 normal = -[Mf{i}(round(cutoff*length(Mf{i-1})):round((1-cutoff)*length(Mf{i-1})),3); Mf...

2 days ago | 0

| accepted

Answered

Matrix Dimensions Must agree

t=(0:tsd:4); t is a vector for j=1:length(t) taking length(t) again implies t is a vector. S(i,j) = exp...

Matrix Dimensions Must agree

t=(0:tsd:4); t is a vector for j=1:length(t) taking length(t) again implies t is a vector. S(i,j) = exp...

3 days ago | 0

| accepted

Answered

Remove variables not shared by 4 tables

Create a cell array of the tables. For the moment I will call this tab_cell . Then shared_vars = tab_cell{1}.Properties.Variabl...

Remove variables not shared by 4 tables

Create a cell array of the tables. For the moment I will call this tab_cell . Then shared_vars = tab_cell{1}.Properties.Variabl...

3 days ago | 0

| accepted

Answered

trasfer function to work space

You appear to have a simulink model named stepinfo somewhere on your path that is interfering with calling the Control Systems T...

trasfer function to work space

You appear to have a simulink model named stepinfo somewhere on your path that is interfering with calling the Control Systems T...

3 days ago | 0

Answered

What is the difference between structure and table?

table has a nicer output presentation, and should be more efficient in memory. It also has some useful operations especially whe...

What is the difference between structure and table?

table has a nicer output presentation, and should be more efficient in memory. It also has some useful operations especially whe...

3 days ago | 0

| accepted

Answered

year command does not work properly

It looks to me as if you are trying to read an excel numeric date. Excel uses Jan 1 1990 as its time base. If you have an exc...

year command does not work properly

It looks to me as if you are trying to read an excel numeric date. Excel uses Jan 1 1990 as its time base. If you have an exc...

3 days ago | 0

Answered

Trouble with DICOM values

You should be using the dicom RescaleSlope and RescaleIntercept. Convert the data to double, multiply by the slope, add the inte...

Trouble with DICOM values

You should be using the dicom RescaleSlope and RescaleIntercept. Convert the data to double, multiply by the slope, add the inte...

4 days ago | 0

Answered

Calling PSCAD to Matlab

https://hvdc.ca/pscad/automationlibrary You can have MATLAB call Python to use the pscad automation libraries This tends t...

Calling PSCAD to Matlab

https://hvdc.ca/pscad/automationlibrary You can have MATLAB call Python to use the pscad automation libraries This tends t...

4 days ago | 0

Answered

how to fill color outside of a map plot in matlab like an example given below

poly2mask() and repmat() [1 1 3], and set those locations in the RGB array to the maximum for your color range (typically 255 fo...

how to fill color outside of a map plot in matlab like an example given below

poly2mask() and repmat() [1 1 3], and set those locations in the RGB array to the maximum for your color range (typically 255 fo...

4 days ago | 0

Answered

Attempting to Plot Multiple Answers from a Loop

You do not define a variable V in your code, but you use it in the line xn=(V*T(i))+xn and you attempt to plot it several time...

Attempting to Plot Multiple Answers from a Loop

You do not define a variable V in your code, but you use it in the line xn=(V*T(i))+xn and you attempt to plot it several time...

4 days ago | 0

Answered

How to interface pscad with matlab?

http://www.ipstconf.org/papers/Proc_IPST1997/97IPST023.pdf https://www.researchgate.net/post/How_to_make_an_interface_between_M...

How to interface pscad with matlab?

http://www.ipstconf.org/papers/Proc_IPST1997/97IPST023.pdf https://www.researchgate.net/post/How_to_make_an_interface_between_M...

4 days ago | 0

Answered

Solving Numerical Differential Equation

Use v0 = 0; you tried to use an equation as an intial condition, but that can be done only for symbolic differential equations...

Solving Numerical Differential Equation

Use v0 = 0; you tried to use an equation as an intial condition, but that can be done only for symbolic differential equations...

4 days ago | 0