回答済み
Filling in a polygon
Hi, it depends on the order you enter the single points. See this: x8=[0, 2, 2.5, 3.5, 5, 4, 5, 3, 1, 1.5]; y8=[2, 2, 0, 2...

約7年 前 | 0

回答済み
BVP4C code not giving an output & boundary condition issues.
Hi, your function does not return anything. Try: sol = main; subplot(2,1,1) plot(sol.x,sol.y) grid subplot(2,1,2) plot(so...

約7年 前 | 0

回答済み
None linear least square fit for complex model
Hi, have a read here: https://de.mathworks.com/help/releases/R2015a/curvefit/fit.html?searchHighlight=fit#bto2vuv-11 There is...

約7年 前 | 0

回答済み
Plot error, vector must be same length
Hi, make t same size then the vectors you want to plot: % h = 0.08; nmax = 800; wx = zeros(1, nmax); wy = wx; wz = wx; t...

約7年 前 | 1

| 採用済み

回答済み
Is't possible to plot a one curve with two Y-axises for this case
Hi, just scale them: A=[0.5778 40.0000 152.8081 0.5867 41.0000 154.7064 0.5956 42.0000 156.5817 0.6045...

約7年 前 | 0

回答済み
How do i fix this error?
Hi, the Display option is only avaiable if the fitting method is nonlinear least squares: https://de.mathworks.com/help/curvef...

約7年 前 | 0

回答済み
Unable to find explicit solution for "solve"
Hi, solve numeric: % Values for constants - I took some fantasy values... Isc = 0.1; Is = 1; q = 2; Rs = 0.0135; Rsh = -2...

約7年 前 | 1

| 採用済み

回答済み
how can i a create a struct?
Hi, the best way to learn Matlab is reading the excellent documentation. Have a read here: https://de.mathworks.com/help/matla...

約7年 前 | 0

| 採用済み

回答済み
Produce an excel file with major and minor column name
https://de.mathworks.com/matlabcentral/answers/337613-how-to-merge-cells-in-excel

約7年 前 | 0

回答済み
"the scope of variable spans multiple functions matlab"
Hi, yes, it is due to the nested functions. It is one possible way to avoid global variables. There is nothing wrong with it. T...

約7年 前 | 4

| 採用済み

回答済み
Average of two closed curves
Hi, try: % Calculate Parts to 90° angle1 = linspace(0,pi/4,180)'; % Radius of circle = length of square = 1 r = 1; % Calcu...

約7年 前 | 3

回答済み
Error when using ezplot
syms a(x,y) a = x^3 + y^3 - 3*x*y == 0; ezplot(lhs(a),[-2, 2, -3, 2])

約7年 前 | 0

| 採用済み

回答済み
Help me with indexing please?
Hi, as suggested in the comments read the documentation. Here is a small example which is near by your problem. Try to understa...

約7年 前 | 0

| 採用済み

回答済み
Finite Elements Method creating global stiffness matrix
Hi, you overwrite k every time. Im sure it could be done much easier - but here s a quick solution without any code optimizatio...

約7年 前 | 6

| 採用済み

回答済み
distance between two points
dist = sqrt((A(:,1)-B(:,1)).^2 + (A(:,2)-B(:,2)).^2 + (A(:,3)-B(:,3)).^2);

約7年 前 | 0

| 採用済み

回答済み
sound generation using MATLAB
Hi, think about your sampling frequency. Can it really work to sample a signal of 100kHz with a sample rate of 24kHz? Or do you...

約7年 前 | 4

回答済み
Importing .csv files and generating surf plots for each
Hi, have a read here: https://de.mathworks.com/help/matlab/ref/uigetfile.html#mw_8fd45c03-ae42-4f5a-9595-297c77185283 This ex...

約7年 前 | 0

回答済み
Resonance frequency in enclosures
Hi, you can use this function: function Frequencia_Table = Frequencia(v,lx,ly,lz) % Building the array of values nx = [zeros...

約7年 前 | 1

| 採用済み

回答済み
GWO structure help, please rewrite the code help
NumAgents = 7; maxiters = 2000; lb = [0 2]; ub = [1 5]; dim = 2; fobj = @my_function_that_expects_a_vector_of_2_values; ...

約7年 前 | 0

回答済み
Error using sym/subs Too many input arguments. Error in mx_model (line 176) f = subs(f, cup,cu,0);
Hi, as the error message says, there are too much input arguments. The correct syntax for subs is: subs(eqn,old,new) The code...

約7年 前 | 0

| 採用済み

回答済み
what does "X = X./max(max(X))" means?>
Hi, the dot means an elementwise operation. See here: https://de.mathworks.com/help/matlab/ref/rdivide.html For more informat...

約7年 前 | 1

回答済み
Extract all numbers from a matrix that also contains NaN into a single vector
A = [1 2 3; NaN -2 0; NaN 5 -8] result = A(~isnan(A)) gives. A = 1 2 3 NaN -2 0 NaN 5 -...

約7年 前 | 0

| 採用済み

回答済み
Finding unique values from arrays of different sizes
Hi, transpose them: A = [1; 2; 3]; B = [3; 4; 5]; C = [5; 6]; D = [8; 9]; % works_not = unique([A B C D]) works = unique(...

約7年 前 | 0

| 採用済み

回答済み
Error: Trust-region-dogleg algorithm of FSOLVE cannot handle non-square systems; using Levenberg-Marquardt algorithm instead.
Hi, add this line before you call fsolve: opts = optimoptions(@fsolve,'Algorithm', 'levenberg-marquardt'); Then in your call ...

約7年 前 | 1

回答済み
how to maximize the ratio between two areas
Hi, sorry for the late reply. I attached 2 files: Optm_Geo_new.m which is an adapted version of your original file and (if i m...

約7年 前 | 0

| 採用済み

回答済み
Efficient sparse matrix operation
Hi, if you precalculate the sum and then calculate you can save some time: N = sum(S,2); S./N; I tried using sparse matrices...

約7年 前 | 0

回答済み
matlab out of memory error when multiplying 2 matrix
Hi, consider: X = ones(3,120744); result_1 = X*X'; % --> Result = 3 x 3 Matrix (72 Byte) result_2 = X'*X; % --> Result = 1...

約7年 前 | 1

| 採用済み

回答済み
transfer fuction representation needed
Hi, this is a compact way to express 1 transfer function with 3 inputs and convert it to a state space representation.You can f...

約7年 前 | 1

| 採用済み

回答済み
HOW TO CREATE THİS MATRİX
Hi, beginning from R2016b you can use: A = [0:99] + [0:99]' or - with respect to Madhans comment for prior releases: B = bsx...

約7年 前 | 0

回答済み
Finding a maximum using gamultobj tool
Hi, all optimizers in Matlab try ti find minimum of functions. If you want to maximize you simply minimize the negative functio...

約7年 前 | 0

| 採用済み

さらに読み込む