Respondida
f(x) = x^2 - 200x + 9999.9999 by using bisection method in matlab please help me. interval [0, 10000]
Is there something that is missing? f = @(x) (x^2 - 200*x 9999.9999); In addition to that, it seems to me that user will hav...

alrededor de 3 años hace | 0

Respondida
How to plot Vector in 3d using two angles and initial point
I must admit something is confusing me in your post. If you have a point in 3D space and the second point is in origin, then yo...

alrededor de 3 años hace | 0

| aceptada

Respondida
replacing xcorr x-axis lags with the original axis
Is this something you search for? data = dlmread('data.txt'); x = data(:,1); y = data(:,2); % Find dT i.e. step size dt =...

alrededor de 3 años hace | 0

| aceptada

Respondida
Generating random circles/ellipses inside circular domain
Since you provided an example in which all small circles have the same radius, perhaps the following code will suit your needs: ...

alrededor de 3 años hace | 0

Respondida
I have to create a rectangular signal with a different period and amplitude at every run, but I don t know how to chnage the aplitude
Just play with randn (normal/gauss distrbution): clc close all clear all format long Fs1=1000; Fs2=1000; Ts1=1/Fs1; Ts2=...

alrededor de 3 años hace | 0

| aceptada

Respondida
Exporting figure maintaining given pixel size
The preferred way to save figures is to use builtin function called exportgraphics Usually, if you need finer/better resolution...

alrededor de 3 años hace | 0

Respondida
How to search for substring in cell array and get the corresponding index then?
Please have a look at the following example: C1 = {'Smith','Chung','Morales' [4 5 6]; ... 'Sanchez','Peterson',1:15,'Ada...

alrededor de 3 años hace | 0

| aceptada

Respondida
group coordinates according to the value of z
I would start like this: coordinate = importdata('coordinate.txt'); z_coordinate = unique(coordinate(:,3)); N = numel(z_coord...

alrededor de 3 años hace | 0

| aceptada

Respondida
MATLAB maximum value under a certain value
v = 1:20 max_treshold = 15; b_max = max(v(v < 15)) This is pretty easy in Matlab.

alrededor de 3 años hace | 0

Respondida
How to simplify plotting using a function?
Why not trying straightforward: function readVoltageDraw(a, startTime, ax) voltage = readVoltage(a, 'A1'); t = datetime...

alrededor de 3 años hace | 0

| aceptada

Respondida
Why does .* create a matrix when multiplying a row vector by a column vector
You don't need to write extra code to check orientation. I would use this: c = a(:).*b(:) It is only a bit more to code. BT...

alrededor de 3 años hace | 1

| aceptada

Respondida
two lines on the same graph
You need to use hold. Please have a look in the documentation https://www.mathworks.com/help/matlab/ref/hold.html

alrededor de 3 años hace | 0

Pregunta


High pass filter lower amplitude of the filtered signal
Inspired by a similar question, can someone please help me understand why amplitudes of the frequencies that are in the pass zon...

alrededor de 3 años hace | 1 respuesta | 0

1

respuesta

Respondida
Index in position 1 exceeds array bounds (must not exceed 1)
Here in the loop: for t = 1:T for h = 1:H PV(h,t+1) = PV(h,t); You're trying to access PV(2,1), when PV is PV = ...

alrededor de 3 años hace | 0

Respondida
chol() returns error even the matrix is positive definite.
Without actual code it is very hard to know for sure, but using chol() function in Matlab is actually a preferred way to test if...

alrededor de 3 años hace | 0

Respondida
How to solve unable to resolve function.
It is because pf is a structure or an object and your script didn't define it anywhere. Please run whos in the command wind...

alrededor de 3 años hace | 0

Respondida
linecirc error for input arguments of type double
This should not be a problem. Please have a look at this code snippet: clear clc close all % Radius R = 2; t = linspace...

alrededor de 3 años hace | 0

| aceptada

Respondida
Optimization of a multivariable function within given solution space
You probably want something like this: % x,y, z are elements of vector X fun_h = @(X) X(1)^2+2.5*sin(X(2))-X(3)^2*X(1)^2*X(2)^...

alrededor de 3 años hace | 0

Respondida
Solving linear system with constraints
In order people to help you, insert your code instead of screenshot. Please use code tags shown here: Regarding the questio...

alrededor de 3 años hace | 1

Respondida
Can I use interpolation to small scale?
Not really sure if I understood your question, but if you want less data points within the same interval, then just use interp1....

alrededor de 3 años hace | 0

| aceptada

Respondida
preforming fourier transform to a audio file
Here is a small example based on Matlab's documentation on fft function clear [y, Fs] = audioread('guitartune.wav'); sounds...

alrededor de 3 años hace | 1

Respondida
How to set a force equal to one value over a range of theta and another value for the other range of theta?
theta = linspace(0,360); force = zeros(size(theta)); force (theta >= 0 & theta < 180) = 100; force(theta >= 180 & theta <= 36...

alrededor de 3 años hace | 0

Respondida
To remove part of the string while writing in a text file
formatSpec = '\t%d km/h, %g g\t%s'; A1 = 80; A2 = 0.2; A3 = 'Long_Pre_Event.res'; fileID = fopen('exp.txt','w'); fprintf(...

alrededor de 3 años hace | 0

| aceptada

Respondida
Plot binary sequence of type char (MATLAB)
This is how I would do it: bin_sq = '011010001000000001010011'; N = length(bin_sq); % nr of characters pulse_duration = 2; ...

alrededor de 3 años hace | 0

| aceptada

Respondida
How to filter high amplitude signals ?
I think this can do just fine: rand_arr = 1+2*randn(100,1); plot(rand_arr, 'o'); hold on amp_level = 2; % treshold filt_a...

alrededor de 3 años hace | 0

| aceptada

Respondida
Extracting data from handle objects
I hope this helps a bit: clear clc obj_arr = struct('value1',[], 'value2',[]); rng(0) % Initialize obj_array for ii = 1:...

alrededor de 3 años hace | 0

| aceptada

Respondida
Unrecognized function or variable 'wgs2utm'
It seems that wgs2utm is not recognized as a built in function. Please check this: https://www.mathworks.com/matlabcentral/file...

alrededor de 3 años hace | 0

Respondida
extract numbers from specific lines in text file
Would something like this satisfy your need? fid = fopen('coord.txt'); tline = fgetl(fid); search_str = '(mm,mm,mm,deg):'; m...

alrededor de 3 años hace | 0

| aceptada

Pregunta


Using least square fitting function lsqr
Hello, I need an example how to apply Matlab's built in lsqr function to solve the following task. let's say I have a sequence...

alrededor de 3 años hace | 1 respuesta | 0

1

respuesta

Respondida
Arranging JSON-formatted txt file
Maybe something like this: raw = '{"phase":["328.17418282485926","98.13568811161387","267.3230213793066...........,"],"rssi":["...

alrededor de 3 años hace | 0

| aceptada

Cargar más