Community Profile

photo

Chris


Last seen: Today Active since 2018

doin' a PhD.
not good at interviews.
pessimist with a deep humanist streak.
never studied philosophy.

Programming Languages:
Python, C, MATLAB

Statistics

All
  • 3 Month Streak
  • Thankful Level 1
  • Knowledgeable Level 3
  • Revival Level 1
  • Treasure Hunt Participant
  • Solver
  • First Answer

View badges

Content Feed

View by

Answered
Why am I getting an error 'Execution of script cosamp as a function is not supported'
Using the function provided by @Elghandouri Mohammed and the original script, the error I get is: Error using _*_ Incorrect d...

2 días ago | 0

Answered
Meshgrid or other structure?
Axis_A = (-96:8:96)/2; mgrid = Axis_A+Axis_A'; would give you that matrix. As would [x,y] = meshgrid(Axis_A); mgrid = x+y;

5 días ago | 0

Answered
How do I convert tall array duration time vector to HH:mm:ss for merging with tall array datetime vector ?
dates = tall(repmat(datetime(date),3,1)) times = tall(repmat(duration(15,12,1,345,'Format','hh:mm:ss.SSS'),3,1)) times.Format ...

6 días ago | 0

| accepted

Answered
why the plot doesn't work ,in the code i'm finding the estimation value of the phase using montecarlo simulation
since length(SNR) is 1, you are running one loop iteration and generating one point. plot() doesn't show one point unless you sp...

6 días ago | 0

Answered
Graphical Draw Path Segments
Perhaps a "bezier toolbox" with an interactive mode would be useful: https://www.mathworks.com/matlabcentral/fileexchange/69302...

alrededor de 1 mes ago | 0

| accepted

Answered
How to produce results of script in table
Your variables are all updated in place, overwriting the previous state. You could make an array out of each variable, and upda...

alrededor de 1 mes ago | 0

| accepted

Answered
Imresize3 not resizing in z direction?
The second method should work. Are you sure you used imresize3() and not imresize() for that? For the first method, input all t...

alrededor de 1 mes ago | 0

| accepted

Answered
Differential Operator in Matlab in 1 Dimension
I'm not a math major so there's probably something technically wrong about this statement, but "d/dx" is essentially "dy/dx", re...

alrededor de 2 meses ago | 1

Answered
Find the number of red marks in box plot
One method, which may not necessarily correlate to a boxplot in all situations (but probably works for the default boxplot), is ...

alrededor de 2 meses ago | 0

| accepted

Answered
geting matlab installer to start on linux
From a comment deep in the thread (here), and from reading your symptoms, what typically works with this version of Ubuntu is: ...

2 meses ago | 2

| accepted

Answered
Converting datenums to get time durations
I don't see where WaveHeight is declared, but you can calculate a duration by subtracting datetimes. ThreshDate = datetime('now...

2 meses ago | 0

Answered
How can I identify the amplitude peaks from an FFT?
You can use findpeaks, probably with some additional parameters. For instance, if the plotted signal is P: Z = findpeaks(P,'Min...

2 meses ago | 0

| accepted

Answered
IF Statement Help?
This statement would flow like this, for a 30-degree angle (in pseudocode): if CurrentPosition < 45 % True, so... wri...

2 meses ago | 0

Answered
Help with a tiny project ( building a graph)
If I understand correctly, you only wish to plot I as a function of x. I have modified your function slightly (at the end of t...

2 meses ago | 1

| accepted

Question


Why are alternative forms for "dbstop in file at location if expression" not documented?
This question is prompted by another question here. It was fairly easy to guess that dbstop('file','10') would set a breakpoi...

2 meses ago | 1 answer | 1

1

answer

Answered
Use variables in dbstop
dbstop(file,num2str(line)) Usually, functions that have input forms like dbstop has can also be called like a normal function...

2 meses ago | 1

| accepted

Answered
A better way to do antidiagonal matrix vectorization?
I believe this works for tall arrays and square arrays. I haven't yet figured out how to compensate if N>M. It's not as fast as...

3 meses ago | 1

Answered
A question about the efficiency of matrix multiplication in MATLAB.
Matlab was built to do matrix math first, with the highly optimized LAPACK library at its heart. That's what it's using for case...

3 meses ago | 0

Answered
How can I average same-calendar-month returns over the prior 20-year period?
This is a complex question. I would answer your questions with a cell array of tables, and a whole lot of untested (because I d...

3 meses ago | 0

| accepted

Answered
How do i write a line to display all the values that didn't meet the requirement
SigmaAp = 5; SigmaAx = randi(9,5,1) idxs = find(SigmaAx>SigmaAp) disp('Values over the limit:');disp(SigmaAx(idxs))

3 meses ago | 0

| accepted

Answered
How to read GSI (text) file?
A = readlines('Example_of_GSI.txt'); parsed = split(A).strip('*'); Does that break it down enough for you to work with?

3 meses ago | 0

| accepted

Answered
I need to find a pattern in a column
A = readmatrix('test.xlsx'); count = 0; for idx = 1:numel(A)-34 if sum(A(idx:idx+34)) == 0 count = count+1; ...

3 meses ago | 0

| accepted

Answered
Livescript results in incorrect Math output
The commented-out line is: lambda_j + 2*rp*max(subs(g1,[x1;x2],x), -lambda_j/(2*rp)) lambda_j is 1. The second term (which use...

3 meses ago | 0

Answered
Why shift, take absolute value and perform log transform to the frequency spectrum of an image obtained by fft2?
take the absolute value The log of a negative number is undefined, which would make for a boring image. apply a log transforma...

3 meses ago | 0

Answered
Store values from a for loop in matrix and plot them.
You need an index to keep track of your loop iterations. You can do this one of two ways: idx = 0 for Prc = Prc=7:1:27 idx = ...

3 meses ago | 0

| accepted

Answered
How to draw a surface starting from a 3 column vector X, Y, Z with no regular grid on X, Y ?
Another useful function is griddata

3 meses ago | 0

Answered
changing the time zone for two datetime objects then comparing them
t.Date3.TimeZone = 'Asia/Dubai'; d.date.TimeZone = 'Asia/Dubai'; Works for me.

3 meses ago | 0

Answered
convert python code to MATLAB
With Mie.py in your Matlab path and pyenv set up correctly, do: mie = struct(py.Mie.MieQ(1.525+0.0011j,450,300,pyargs('asDict',...

3 meses ago | 0

Answered
Contour plot omitting certain points
If it bothers you, you can set caxis(min_lim,max_lim). You can include more levels by indicating the number in the function cal...

3 meses ago | 0

| accepted

Answered
Increase the height (size) of subplots
If you have 2019b or newer, you can use a tiledlayout. It doesn't really show here, but there's a difference. https://www.mathw...

3 meses ago | 0

Load more