Questions tagged [magnitude]

74 questions
4
votes
2 answers

Order of magnitude using Big-O notation

This is likely ground that has been covered but I have yet to find an explanation that I am able to understand. It is likely that I will soon feel embarrassed. For instance, I am trying to find the order of magnitude using Big-O notation of the…
sunnlamp
  • 75
  • 1
  • 6
3
votes
1 answer

How to push dynamic object with same speed using UIPushBehavior?

I'm not a physics expert. However, I want to move UILable which has a dynamic height (depends on content) just like teleprompter. But when I start behaviour with magnitude 10, it starts moving but suddenly its slow down and I want continuous move…
Sunil Targe
  • 7,251
  • 5
  • 49
  • 80
3
votes
1 answer

range builder `r_` - slice with complex (but not imaginary) step; magnitude is used

Playing with the NumPy concatenation and range building object r_ I stumbled over the following behavior: apparently, a complex step no matter whether real, imaginary or proper complex has its absolute value taken as the number of steps in a…
Paul Panzer
  • 51,835
  • 3
  • 54
  • 99
3
votes
3 answers

Efficient Magnitude Calculation of 3D Vector

I'm working on an inertial measurement project using a 3-axis accelerometer and an Arduino. I want the Arduino to take in the x, y, and z g-values and spit out the magnitude. Since the |a| = sqrt(x^2 + y^2 + z^2) is computationally expensive, I…
Raddy
  • 39
  • 2
  • 6
3
votes
2 answers

Setting the magnitude of a 2D Vector

trying to port something I made in javascript using the p5.js library which has a setMag function for 2D vectors here's the documentation for it How can I set the magnitude of a 2D vector in ROBLOX/lua? function particle:update(mouseX,mouseY) …
Ducktor
  • 337
  • 1
  • 9
  • 27
3
votes
1 answer

Python Pylab, how to alter the size of the label specifying the magnitude of the axes

I am attempting to plot differential cross-sections of nuclear decays and so the magnitudes of the y-axis are around 10^-38 (m^2) pylab as default plots the axis as 0.0,0.2,0.4... etc and has a '1e-38' at the top of the y-axis. I need to increase…
user3412782
  • 561
  • 1
  • 4
  • 9
3
votes
1 answer

How can I find the biggest magnitude present in a numpy array?

Say I have: A = np.array( [1,2,3,-8] ) I need a function that would return 8 I know it's a simple one, but instant Google-Fu failed, hence some merit in populating SO maybe.
P i
  • 29,020
  • 36
  • 159
  • 267
2
votes
0 answers

MATLAB: FREQZ plot

The following code plots the frequency response of 2 systems. However, the second phase plot is not showing on the plot. freqz(X) hold on freqz(y) lines = findall(gcf,'type','line'); lines(1).Color = 'red' lines(2).Color = 'green' lines(3).Color =…
Yuv
  • 45
  • 1
  • 6
2
votes
0 answers

Is obspy able to compute the magnitude of a trace or stream?

Anyone here an expert in obspy? I'm making a obspy based application that detects earthquakes with intensity 3 above using the magnitude produced. Is it possible to compute the magnitude using obspy?
2
votes
1 answer

Why using magnitude method to get processed image?

Hi guys I’ve thinking about this question: I know that we use Fourier transform to get into frequency domain to process the image. I read the text book, it said that when we are done with processing the image in the Fourier domain we have to invert…
H_E_A_D
  • 101
  • 1
  • 1
  • 8
2
votes
1 answer

how to decompose an image into magnitude and phase and reconstruct it again using Matlab?

How can I decompose an image (e.g. Lena) into magnitude image and phase image and reconstruct it again from those two images using Matlab? Here is the code I have written in Matlab but I dont know why the reconstructed image is too dark or too…
MJay
  • 987
  • 1
  • 13
  • 36
2
votes
1 answer

C++ finding most significant bit of a binary number?

I've done some digging and I didn't find a solution to my question yet. I want to take a decimal number and turn it into bits. Then i want to analyze the bits and determine the highest bit. For example, 8 is represented as 1000 in binary. The most…
randy
  • 17
  • 1
  • 3
1
vote
2 answers

Mandelbrot Set C# not doing what it's supposed to

I am new to coding and I have started my journey by learning C# as my first programming language. As an assigment I am trying to code a program that draws a Mandelbrot set, but it is not drawing what it is supposed to and I can't seem to find any…
1
vote
1 answer

For a specified value in one column, find magnitude of change in values in another, for each ID

If I have a dataframe that looks something like this: df <- data.frame( NestID = c(rep("LB1_2014", 9), rep("LB2_2014", 2)), Datetime = seq(from = ymd_hms("2014-04-02 05:00:00"), to = ymd_hms("2014-04-02 15:00:00"), by = "1 hour"), Temp =…
bex
  • 23
  • 4
1
vote
1 answer

Pandas Dataframe - How do you check the sign of numeric values in a column, remove the sign if negative & create another column if this has happened?

Python 3.8, using Pandas. I am trying to remove the sign from negative numbers in a pandas data frame column 'DATA' to just leave the magnitude, i.e. all values are positive. In essence, multiply the value in one column by -1, but only when it is…
1
2 3 4 5