回答済み
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

| 採用済み