回答済み
Find the theta1 and theta2 values that maximize the function
obj8Run = @(theta) -mean(sum((1+theta(1).*csecxit+theta(2).*csecyit)/N.*R4-c*t4,2))./sqrt(sum((1+theta(1).*csecxit+theta(2).*cse...

10日 前 | 0

回答済み
[大至急お願い致します] for文の入れ子に関しまして
[d, c, b, a] = ndgrid(1:10); fun = @(a,b,c,d) (a + b).^c .* d; fun(a(:), b(:), c(:), d(:))

10日 前 | 1

回答済み
Answer to the following points:
doc colon doc transpose Start with MATLAB Onramp course.

10日 前 | 0

回答済み
Convert String to Numerical Matrix
Normally str2num() is not suggested: Wanted = sscanf(A(2:end-1), '%d').' % edited after sir Walter’s comment to exclude []

10日 前 | 1

| 採用済み

回答済み
Add terms to previously defined differential equation (Symbolic)
eq_damped = lhs(eq_undamped) + damping == rhs(eq_undamped)

11日 前 | 2

| 採用済み

回答済み
finding the mean based on a specific value in other column
ix = (abs(column_1 - 527.1235) < 1e-4) &... (abs(column_1 - 927.5) < 1e-1); M = mean(column_4(ix))

11日 前 | 0

回答済み
How to assign value to variable
syms Y equation = Y + 5 == 10

11日 前 | 0

回答済み
Counting in a loop
Note: Never name a variable times. function TimeS = timeLoop(startVelocity, distance) TimeS = zeros(size(startVelocit...

11日 前 | 0

回答済み
How to place values in vectors from a text file
T = readtable('Test.txt', 'ReadVariableNames', 0); C = cellfun(@(x) sscanf(x, '%d').', T{ismember(T{:, 2}, 'tag'), end},... ...

11日 前 | 0

回答済み
What are the obsessions you saw in MATLAB Answers or in MATLAB programming?
Have to use MATLAB even for a simple calculation eventhough it could be done in mind.

11日 前 | 2

回答済み
take input in array
Use input() , enter the values in the form [1,5,4] an example. doc input

11日 前 | 0

回答済み
Output simpler version of symbolic polynomial expression
syms x y a b z = a*x^2 + 2*a*x*y + b + a*y^2; simplify(collect(z, a), 'Steps', 50)

12日 前 | 0

回答済み
Non square matrix rotation
matrix.'

12日 前 | 1

回答済み
Mean between an interval
x = 1:5; x(.2) % error x(2) % no error , index can only be integers not decimals I suggest you to do MATLAB Onramp course.

12日 前 | 0

回答済み
issues with syms function
You have a custom file named sym.m , remove it from the path or rename it.

12日 前 | 0

回答済み
Function returns ans, how to exclude?
[x1, x2] = quad_equation function [x1, x2] = quad_equation prompt = 'a = '; a = input(prompt); prompt2 = 'b = '; b ...

13日 前 | 0

回答済み
Problem with displaying numbers
double(EmptyW) %or vpa(EmptyW)

13日 前 | 0

回答済み
Error in function handle using fminsearch
min3 = fminsearch(f, x0);

13日 前 | 0

| 採用済み

回答済み
Make a vector based on for loop values
You are close: if (mod(n,2) == 1)&& (mod(n,11) == 0 || mod(n,13) == 0); If the above statement is true , you will save n ...

13日 前 | 0

| 採用済み

回答済み
Error in ODE45
MATLAB doesn't have implicit multiplication, hence: dT1 = (F1*(Tc-T1)+Fr*(T2-T1)+(Q1/rho_w*Cp))/(A2*h2); Note: Fr is not ...

14日 前 | 0

| 採用済み

回答済み
Repeat value/variable in one column based on variable in another column
c = {'CS1' '7' '7' '7' '7' 'CS2' '9' '9' '9' ... 'CS1' '7' '9' '7' '7' '7' '7' '7' 'CS1'}; ix = ~isnan(str2double(c)); ...

14日 前 | 0

| 採用済み

回答済み
Matrix with for cycle
Qbar = cell(N, 1); % preallocate properly for other variables also Qbar{ii} = ... inside loop

14日 前 | 0

| 採用済み

回答済み
How do I get the differential of Hermite polynomial function?
https://www.mathworks.com/matlabcentral/answers/606286-how-do-i-get-the-differential-of-hermite-polynomial-function#comment_1039...

14日 前 | 0

回答済み
Matlab array and matrices
<https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html> Start with MATLAB On-ramp course.

15日 前 | 0

回答済み
Convert for loop to while loop
Initialise ii with 0 instead of 1. Otherwise you start it as 2 therefore when you reach 5 it gets incremented to 6 exceeding the...

15日 前 | 0

回答済み
How to remove the swap vectors from a matrix?
[Original_matrix, c, ~] = unique(sort(matrix, 2), 'rows'); New_matrix = matrix(setdiff(1:size(matrix, 1), c), :)

15日 前 | 0

回答済み
How to store functions in matrix or some way to define them by iterations?
x = 0 : .01: 1; u = x.^2 + 6*x - 7;

17日 前 | 1

| 採用済み

回答済み
How to check if a column data is equal to any of a group of values?
clear sum Ind = sum(ismember(A, B), 2) %Or perhaps you need Ind = nnz(ismember(A, B)) %or fprintf('%d occurs %d times/s\n',...

17日 前 | 0

Load more