Community Profile

photo

Sargondjani


Last seen: 4日 前 2012 以来アクティブ

Statistics

  • First Review
  • Knowledgeable Level 3
  • 3 Month Streak
  • Thankful Level 2
  • First Answer

バッジを表示

Content Feed

表示方法

回答済み
Add x=y line to the scatter plot
x = linspace(300,600,2); y = x; plot(x,y) And you will need a hold command after the scatter command.

24日 前 | 0

回答済み
Find the difference between two numbers in an array and create a new array
d_theta=diff(theta);

24日 前 | 0

| 採用済み

回答済み
Discretise a domain into a grid of uniform volume size
Why is linspace not helpful? x1 = linspace(0,1,M); x2 = linspace(0,1,M); [X1,X2] = ndgrid(x1,x2);

24日 前 | 0

質問


Scientific description of cubic spline (interpolation)
Dear all, I am writing a scientific article (quantitative economics), and I need to describe the 'spline' method (cubic spline ...

24日 前 | 0 件の回答 | 0

0

回答

回答済み
how can i save the even index to a matrix 2:5 using for loop
I think you want something like this: (which you could speed up by pre-allocating MAT=NaN(2,5)) cnt_rows = 0; cnt_cols = 0;...

28日 前 | 1

質問


mldivide versus least squares: X\(eye(m)) versus ( (X'X)\eye(m))*X'
Dear all, I am fitting a polynomial to data. I construct a polynomial basis X. I use some algorithm to update Y. I could use t...

28日 前 | 1 件の回答 | 0

1

回答

回答済み
Please help me convert equation to matlab code
[0 0 0;1 2 3] is an example of a matrix i Matlab. Please try the rest yourself. We are not here to do your homework. If you gav...

約1ヶ月 前 | 0

回答済み
Error in fmincon (line 568) initVals.f = feval(funfcn{3},X,varargin{:})
As the error says there is no function P_model_main. You also only provided coded with a function called P_model. And please don...

約1ヶ月 前 | 2

回答済み
Changing color of plot
The problem is that you plot only 1 point at a time. So there is no line to plot, just a point. That's why your code doesn't wor...

約1ヶ月 前 | 0

回答済み
How to evaluate parameters in sum() of handle functions with fminsearch
Take a look at this. I hope it helps. x_exp=rand(1,10); %just to define the known vectors y_exp=rand(1,10); n=3; g=rand(1,n)...

約1ヶ月 前 | 1

| 採用済み

回答済み
Plot the slope of a parabola with only the data points being known
clc; clear all; close all; x = linspace(-0.5,0.5,25); %length in (meters) def_3mm_no_grav = -[0.00 5.82e-1 1.08 1.53 1.94 ...

約1ヶ月 前 | 0

回答済み
How do I plot if I have a lot of data on the x-axis and I want to see the whole line properly in app designer?
It is not clear what you mean with "How can I see all the lines correctly?" I'm sure the lines are correct, but your input is n...

2ヶ月 前 | 0

回答済み
I can't figure out how to define X in a piecewise function to create a Bending Moment Diagram
The script of your professor is actually the function. Save it and you can call the function. function handle: myfun = @(x)mom...

2ヶ月 前 | 1

回答済み
fsolve, fmincon producing different results
I believe fmincon could also be stuck in a local minimum, due to the quadratic terms. This solution might not actually solve the...

2ヶ月 前 | 0

回答済み
how to retrieve a table from a cell array?
NEver used table but i think this will work: X = results{1,2}{1,1}; MyDates = X.Date; Might even work directly: MyDates = ...

2ヶ月 前 | 0

回答済み
Issue with numerical integration of two variable function
You created only function handles. So f(x,y) = ..... To compute the numerical value you need to assign numerical values to x an...

2ヶ月 前 | 0

回答済み
Index in position 2 exceeds array bounds (must not exceed 2). Error in fun1 (line 5)
You calculate: for i=1:N for j=1:D pos(i,j)=lb(j)+rand*(ub(j)-lb(j)); end end with D= 2, so pos is a...

2ヶ月 前 | 0

回答済み
How to Solve matrix equations in Matlab
Your method seems valid. But of course fsolve will only attempt to find a local solution, and it might get stuck in a place wher...

2ヶ月 前 | 1

回答済み
Index exceeds the number of array elements
The argument in brackets should be an index number, so for example: x = 1:10; %a 1 x 10 vector for ix = 1:size(x,2); f(ix) = ...

2ヶ月 前 | 0

| 採用済み

回答済み
How to put fsolve in a loop, using 2 unknowns?
Replace the first line with: H = @(X)fsolve_root_finding(X(1),X(2));

5ヶ月 前 | 0

回答済み
Need to apply trapezoidal rule for double integration with an array by using the for loop
There are two things that need correction: 1) Remove the line i=i+1. This is what the for loop does. (also don't use "i" in ge...

5ヶ月 前 | 0

回答済み
Error in find Precision recall curve
Try without the quotations: [XCrit,tpr,YCrit,ppv] = perfcurve(Y,diffscore1,'HandGrip'); In general quotations are used to sp...

5ヶ月 前 | 0

| 採用済み

回答済み
I am solving a nonlinear Model predictive control problem . I get the following error. Can anybody help me understand the error report?
The error says that the derivative at the initial point (x0) is either NaN, infinity, or complex. So you should check whether th...

5ヶ月 前 | 0

| 採用済み

回答済み
time series interpolation of irregular data
You can use "griddedInterpolant". I would use 'pchip' as method.

5ヶ月 前 | 0

回答済み
Multiple sample values into scatteredInterpolant
What works is: Make a 3D array from B, so: for ih=1:length(B) B_3D(:,:,id) = B{ib) end And then add a vector 'h...

8ヶ月 前 | 0

回答済み
x undefined (Catenary Cable Case Study)
What you have done is programmed a function. So this function calculates fval when you give a value of x. You can now call this...

9ヶ月 前 | 1

| 採用済み

回答済み
Locating point on x-axis where the slope is decreasing
Bascially you want to get the index when the change in theta becomes negative: dtheta = diff(theta); index = find(dtheta<0,1...

9ヶ月 前 | 0

回答済み
Conversion to logical from sym is not possible.
g = 3; eff1=@(rr)-(1.8-0.8.*(1+rr)./(1-7.56.*g*rr))*rr/(0.01-0.11.*rr+0.06.*exp(23*rr)); x=fminbnd(eff1,-1,1); You could s...

9ヶ月 前 | 0

回答済み
Hourly averages over a 20yr time series
Its not exactly clear over which values you want to calculate the mean, but have a look at this function, that can calculate mov...

9ヶ月 前 | 0

回答済み
Removing/clearing NaN/0 values from matrix/array data
A1 = A(A~=0 & B~=0) should work

9ヶ月 前 | 0

もっと読み込む