Respondida
Take average of multiple matrices
@Amir Hosein Shokouhy, Here is a solution: >> D=open('data.mat'); >> phi=D.phi_BFD_v_sum; >> phiAvg=zeros(6,5); >> for i=1:...

casi 5 años hace | 1

| aceptada

Respondida
optimisation: lsqnonlin and fminsearchbnd
@Malgorzata Wieteska, You said you want to ensure that the solutions to a set of differential equations are positive. There is ...

casi 5 años hace | 0

Respondida
log10 vs semilog
@Samantha Cole In the first case, the actual value Draincurrent is plotted on the vertical axis, and the vertical axis has log ...

casi 5 años hace | 0

Respondida
Implementing a code from Berkley Madonna into Matlab
Justin, The attached code shows a way to solve differential equaitons like yours in Matlab, and plot the results. The output is...

casi 5 años hace | 0

| aceptada

Respondida
How to create a subplot of multiple plots within a for loop?
@Alston D'Souza, The atattahced code makes one figure on each pass through the main loop of your code: four passes, four figures...

casi 5 años hace | 0

Respondida
Calculating Electric dipole using Coulomb's law with Quiver
@Kutlu Yigitturk, I modified the program a bit and added the calculation of voltage as well as electric field strength. I thin...

casi 5 años hace | 0

| aceptada

Respondida
Calculating Electric dipole using Coulomb's law with Quiver
@Kutlu Yigitturk [Added this later: the code I attached to this message has one or more mistakes. Please ignore it. Sorry.] m...

casi 5 años hace | 0

Respondida
Error in the following problem input(s): nonlcon: Not enough input arguments.
@Furkan pehlivanoglu, I assume @Walter Roberson is right that you are using the gradient in an optimization routine such as fmin...

casi 5 años hace | 0

Respondida
why is the answer 0.8058 ?
You get the same answer by doing mrdivide(D,D+1) See the man page for matrix right divide. Matlab finds the value of x that g...

casi 5 años hace | 2

Respondida
Error in the following problem input(s): nonlcon: Not enough input arguments.
@Furkan pehlivanoglu, In function c_const(), the array dg is too small. It shouldl be 8x8, but right now it is returned as 8x3...

casi 5 años hace | 0

Respondida
Need help with "mirroring" function
@Rosemaryl21, Using your equations and ranges, you would do: >> x= .05*(0:(20000/723/.05)); >> theta = acos(.0723*x / 2); >>...

casi 5 años hace | 1

| aceptada

Respondida
Need help with "mirroring" function
This works: >> x=0:.01:1; >> y=log(1+x); >> plot([x,x(end)+x,2*x(end)+x,3*x(end)+x],[y,flip(y),y,flip(y)]); See output plot....

casi 5 años hace | 0

Respondida
Solving Exponencial fuction is not returning the right answer
Algebra: x=log(12734/12000)/log(1.02) >> x=log(12734/12000)/log(1.02) x = 2.9980 >>

casi 5 años hace | 1

Respondida
How to adjust counters for multiple for loops
@Kaylee Cornish, You can use two non-nested for loops. The second foor loop fills up the vector zbot. zbot will be 1x4. laye...

casi 5 años hace | 0

Respondida
Optimization involving dot and cross product of two unit length variables
@Ahmad Hamad, The function you want to minimze is below. function y=AhmadsFunc(p) %Ahmad Hamad's function to be minimized s1...

casi 5 años hace | 2

| aceptada

Respondida
IMU GPS fusion for interial navigation example error - quadcopter error
The code cannot find file LoggedQuadcopter.mattrajData. Make sure you have tthe file and make sure it is in a directory that is...

casi 5 años hace | 0

Respondida
Using for loop to plot multiple plots on the same graph
Try putting the figure command and the hold on command outside and before the for loop.

casi 5 años hace | 2

Respondida
FIR Bandpass Filter with Hamming
@Liam Nielson, See code below. %LiamsFilter Liam Nielsen & W.Rose %Requested filter order was 100, but I will use 101 for...

casi 5 años hace | 0

Respondida
Plotting a function within for loop
Your function does not assign a value to the output variable "output". I suggest you initialize vectors theta and phi inside t...

casi 5 años hace | 0

Respondida
How to create a subplot of multiple plots within a for loop?
@Alston D'Souza, This code generates 2 plots above and one plot below: >> x=1:10; >> figure; >> subplot(2,2,1); plot(x,x,'rx...

casi 5 años hace | 0

| aceptada

Respondida
Image analysis of brain image
@reema shrestha, You are right about the limited frequency range. You said the sampling interval was 0.077 second, i.e. sampli...

casi 5 años hace | 0

Respondida
Fit of multiple data sets
@Daniele Sonaglioni, @Star Strider is right. Specifically, if your data is in array A, and if A has N rows x 4 columns, and th...

casi 5 años hace | 0

Respondida
Image analysis of brain image
@reema shrestha I assume that you have a record of intensity (or voltage, if it is an EEG) as a function of time for each pixel...

casi 5 años hace | 1

| aceptada

Respondida
nonlinear and linear regression
@Mhmmd Sjj You get the same results because your model g() is linear in w(1) and w(2): g = @(w,x,y) (w(1).*x+w(2))-y; The err...

casi 5 años hace | 0

| aceptada

Respondida
Minimising coefficients using fminsearch, subject to normalisation condition
@Kyle, I agree with @Andreas Apostolatos that fmincon() is the way to go. See here for details. You are fitting c, which is ...

casi 5 años hace | 0

Respondida
Adding a row and column is a matrix
@Fatima Yusuf, This code creates a square array of zeros. Then it adds a row and a column which are transpose of eachother, in ...

casi 5 años hace | 0

Respondida
Interpolation for 2D matricies
@Marcus Rosales, look up interp2()

casi 5 años hace | 0

Respondida
Rinex observation and navigation
@University Student, Please, if you want assistance, respond to the questions asked ealrier. What happens when you run your co...

casi 5 años hace | 0

| aceptada

Respondida
Does mnrfit use maximum likelihood estimation?
@Zahra Ziaei, "mnrfit uses the iteratively weighted least squares algorithm to find the maximum likelihood estimates." https:/...

casi 5 años hace | 2

Respondida
lsqcurvefit: Errorfitted value units
@AIZAT AKMAL BIN A.MOHAMAD BEDDELEE The Matlb help for lsqcurvefit() does not show any output variable with the name errorfitte...

casi 5 años hace | 0

| aceptada

Cargar más