回答済み
How to plot a 2d potential function
f = @(X,Y) cos(2*pi.*X).*(1+3.*Y) + ((2*pi.*Y).^2)/2 fsurf(f)

約7年 前 | 0

| 採用済み

回答済み
how to get the inverse of a symmetric matrix and ensure accurancy
Hi, you could consider to do the calculation symbolic. Here is a small example: A = [9 3 -6 12; 3 26 -7 -11; -6 -7 9 7; 12 -11...

約7年 前 | 1

| 採用済み

回答済み
How to calculate 8760 data just in one process?
Hi, this is easy: 1) Use xlsread to import the data to Matlab: E = xlsread('PV.xlsx'); 2) Define your constant values - for ...

約7年 前 | 0

| 採用済み

回答済み
How can I convert a double array into a timestamp array?
Hi, use: B = datestr(A, 'HH:MM:SS.FFF') B = 3×12 char array '16:30:37.762' '16:30:37.769' '16:30:37.772' ...

約7年 前 | 2

| 採用済み

回答済み
How do I extract the exponent from a semilogy plot?
Hi, i think you should use lsqcurvefit (requires Optimization Toolbox) or fit (requires Curve Fitting Toolbox) - depending on t...

約7年 前 | 0

| 採用済み

回答済み
How to find length of user input?
Hi, a lots of bugs in this - i think i fixed them all: clc clear isbn = input('Enter a nine digit ISBN number:' ); isbn = c...

約7年 前 | 0

| 採用済み

回答済み
Help in Plotting ECG .csv file
Hi, try this: A=csvread('samples.csv',2,0); plot(A(:,1),A(:,2)) For me it works - there is no problem with your plot functio...

約7年 前 | 0

| 採用済み

回答済み
How can I create another y-axis on right side?
Hi, use yyaxis. For example: x=A0006_charge(:,1); y=A0006_charge(:,2); a=A0006_charge(:,3); z=A0006_charge(:,4); yyaxis ...

約7年 前 | 0

| 採用済み

回答済み
Terms should add to zero but they don't. Why is this?
Hi, this is due to rounding errors that can not be prevented. You are dealing with numeric calculations, which have a limited a...

約7年 前 | 0

回答済み
what is wrong with my function
You calculate the area of a rectangle. Think about the formula of triangle area...

約7年 前 | 0

回答済み
How to replace variable name in function handle?
Hi, for me this worked: f = @(x1,x2) x1*x2 f = string(char(f)); f = replace(f,"@(x1,x2)","@(x)"); f = replace(f,["x1","x2"]...

約7年 前 | 1

| 採用済み

回答済み
Problem with Linear Regression
Hi, this problem can be solved easily by using mldivide. No additional toolboxes are needed: knobSetting = [0 1 2 3 4 5]'; fl...

約7年 前 | 0

回答済み
Solve with a vector of coefficients
Hi, if i assume that you do not do symbolic calculations and you have values for D, then for this purpose there is the roots fu...

約7年 前 | 1

| 採用済み

回答済み
How can I create a linspace with a condition
Hi, if you know the maximum allowed spacing you can use: function result = mySpacing(StartValue,EndValue,maxSpaceValue) resul...

約7年 前 | 2

| 採用済み

回答済み
how can i write a for loop for g=[2 5 6 8 9]
Hi, use numel function: for i = 1:numel(g) Best regards Stephan

約7年 前 | 0

回答済み
Logical Not Operation To The Fields Of Struct
% define example a(1).b = true; a(2).b = false; % show start values a.b % Reverse them all for k = 1:numel(a) a(k...

約7年 前 | 0

回答済み
How to find out the location difference of nonzero entries in two sparse matrices?
Hi, this are not sparse matrices. However you find the locations given as row and column values and the corresponding values wi...

約7年 前 | 1

| 採用済み

回答済み
Classification learner app not recognizing response variable
Hi, this topic was discussed a few weeks ago. There is no precise answer, since the documentation does not deal with this probl...

約7年 前 | 0

回答済み
How do I tell Matlab a loop index is an integer?
Hi, by default numbers in Matlab are double. cast them to integer: int32(i) Read here: https://de.mathworks.com/help/release...

約7年 前 | 0

回答済み
I can't find where the mistake is. Could anyone help me with my code?
Hi, the way you define t is not useful. Use: t = [0 100] What you do is corresponding to a sample rate of 1 second. This lets...

約7年 前 | 0

| 採用済み

回答済み
Solving simultaneous time-dependent matrix equations
Hi, try: % Defining constants A_a = 7.7790; g1_1 = [0.0019 0.0076] g2_1 = [0.0021 0.0083] ga_1 = [0.1862 0.3725] Hv1 = 2....

約7年 前 | 0

| 採用済み

回答済み
how to create a time table from a table with a column with year number as row times?
Hi, try: arimaxdata.t = years(arimaxdata.t) arimaxdata = table2timetable(arimaxdata) Best regards Stephan

約7年 前 | 0

回答済み
Having trouble solving system of equations
Hi, shorter: syms c1 c2 [sol_c1, sol_c2] = vpasolve(c1==18*c1-1200+((4.8195*10^-8)*(((0.3*c1+c2)^4)-18^4)),c1==(20*c2-500)/-0...

約7年 前 | 1

回答済み
License reinstate fee should be more flexible.
Hi, this forum is run by volunteer Matlab users who can not comment on TMW's licensing policy. You should consider sending your...

約7年 前 | 0

回答済み
Looking for candlestick, rsi, csv file example
Hi, here is a working example for candlestick containing .csv-data which works on R2018b: https://de.mathworks.com/matlabcentr...

約7年 前 | 0

| 採用済み

回答済み
optmization problem in hybrid energy storage system.
Hi, there is an example given which appears to be similar to the task you want to do: https://de.mathworks.com/help/optim/ug/o...

約7年 前 | 0

回答済み
Red Dotted Wire Problem
Hi, try: https://de.mathworks.com/help/physmod/simscape/ref/voltagesensor.html coupling physical signals to usual Simulink si...

約7年 前 | 0

回答済み
isAlways(x^2>=0) is unable to give a solution. Why so when the problem is so simple?
Hi, Matlab also calculates with complex numbers. Make assumptions on x: syms x assume(x,'real') result = isAlways(x^2>=0) ...

約7年 前 | 2

| 採用済み

回答済み
Branch and bound optimization
Hi, see here: https://de.mathworks.com/help/optim/ug/intlinprog.html?s_tid=doc_ta#bts3f9f-4 Best regards Stephan

約7年 前 | 0

| 採用済み

回答済み
Receiving 'Dimensions of arrays being concatenated are not consistent.' error, but there are equal amounts of rows being input.
Hi, try: T = table(Mean, Std_Error, Deviation, Variance, Min, Max, Range, Confidence_95,'VariableNames',{'mean','sem','std','v...

約7年 前 | 2

| 採用済み

さらに読み込む