답변 있음
Indices on the left side are not compatible with the size of the right side error
It's a typo in this line M(i_x,i_theta)= 1200*sind(theta(i_theta)) +400*cosd(theta)*x(i_x); I think it should be M(i_x,i_thet...

7년 초과 전 | 0

| 수락됨

답변 있음
if statement for a matrix
You don't need the loop, just using logical indexing: plot(x(x>10&x<25),y(x>10&x<25))

7년 초과 전 | 1

답변 있음
creating a function getting the graident and passing variables to them
Is this that you want? syms f(x1,x2) f(x1,x2)= 100*(x2-x1^2)^2 + (1+x1)^2; gr(x1,x2) = gradient(f,[x1,x2]) Then you can comp...

7년 초과 전 | 1

| 수락됨

답변 있음
How to generate a file name by combining variable characters based on the input of the matlab?
Try this: name='abc'; a_value = 0.90; b_values = [20 10 -5 60]; c_value = 4; output_file = ['output_file_' name '_value' ...

7년 초과 전 | 1

| 수락됨

답변 있음
How to add right ylabel with complex values (attached data and code)
yyaxis right https://es.mathworks.com/help/matlab/ref/yyaxis.html

7년 초과 전 | 0

답변 있음
How do you identify strings with numbered names in an array?
a= {'Default ',2; 'Default 2',4; 'Card 1 2',6}; res = {'Default '; 'Card 1 '}; res{1,2} = sum(cell2mat(a(startsWith(a(:,1),res...

7년 초과 전 | 0

| 수락됨

답변 있음
Write this without a for loop?
If audioVec is a column array and you ensure that (delaySamples)*EchoGain is a valid index: c = delaySamples+1:length(audioVec...

7년 초과 전 | 0

답변 있음
writetable to (.xlsx file) blank output
Apparently writetable(table,'name.xls','Sheet',2) should work. I think the problem is the name of the variable, table is a mat...

7년 초과 전 | 0

| 수락됨

답변 있음
legend for hold function
I think there is no 'DisplayName' property for a legend, it is aproperty of a chart, but you can do the same as you want just pu...

7년 초과 전 | 0

| 수락됨

답변 있음
Error 'Undefined variable "hisFtrs" or class "hisFtrs".'
At least in those lines of code you haven't defined hisFtrs variable. Can it be histFtrs?? If this is not the answer please prov...

7년 초과 전 | 0

| 수락됨

답변 있음
How to save save split images in multiple filenames?
That solves your problem? for i=1:5 imwrite(imread('gi2.tif',i),['im_' num2str(i) '.tif']); end

7년 초과 전 | 0

| 수락됨

답변 있음
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
We need to know what type of variables the inputs are, give us an example please By the way, zeros(N) is an NxN matrix and you ...

7년 초과 전 | 0

| 수락됨

답변 있음
show part of filenames using uigetfile
Is that that you need? filename = uigetfile('test*.mat')

7년 초과 전 | 0

| 수락됨

답변 있음
MATRIX DIMENSIONS MUST AGREE error while input strings/char
Use ~strcmp(A{i},B{j}) instead of A{i} ~= B{j}

7년 초과 전 | 0

답변 있음
how to load values of two matrices into one matrix?
tmp = 1:length(A)+length(B); h = zeros(length(A)+length(B),1) h(mod(tmp,2)==1) = A h(mod(tmp,2)==0) = B

7년 초과 전 | 0

| 수락됨

답변 있음
differential equations without ode solvers
I think you are overwriting h1 and h2 variables in: h1= 0.5-0.065*sqrt(h1(i)); h2= 0.065*sqrt(h1(i)) - 0.1*sqrt(h2(i)); After...

7년 초과 전 | 0

답변 있음
How to divide the input data for two levels in matlab
I don't know if I have understood your question, but this code split your variable in two: a = temp(1:ceil(L_total/2)); b = te...

7년 초과 전 | 0

| 수락됨

답변 있음
"Subscripted assignment dimension mismatch" error
Your code fails in this line: LST(i)= n(i)+(1/15)*(-Long_rad)+E_solar_rad; The problem is that the rigth side of the equation ...

7년 초과 전 | 0

| 수락됨

답변 있음
Unable to perform assignment because the size of the left side is 1-by-144 and the size of the right side is 1-by-114.
Probably the problem is that (idx1i(i): idx1f(i)) it's not of 144 size. You probably need to put the range in t1_r variable, for...

7년 초과 전 | 0

| 수락됨

답변 있음
Invalid expression error when i execute code
You can't use numbers as a variable names. Valid variable and function names begin with an alphabetic character, and can conta...

7년 초과 전 | 0

| 수락됨