Beantwortet
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...

etwa 7 Jahre vor | 0

| akzeptiert

Beantwortet
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))

etwa 7 Jahre vor | 1

Beantwortet
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...

etwa 7 Jahre vor | 1

| akzeptiert

Beantwortet
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' ...

etwa 7 Jahre vor | 1

| akzeptiert

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

etwa 7 Jahre vor | 0

Beantwortet
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...

etwa 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 7 Jahre vor | 0

Beantwortet
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...

etwa 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 7 Jahre vor | 0

| akzeptiert

Beantwortet
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

etwa 7 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

etwa 7 Jahre vor | 0

| akzeptiert

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

etwa 7 Jahre vor | 0

| akzeptiert

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

etwa 7 Jahre vor | 0

Beantwortet
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

etwa 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 7 Jahre vor | 0

Beantwortet
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...

etwa 7 Jahre vor | 0

| akzeptiert

Beantwortet
"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 ...

etwa 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 7 Jahre vor | 0

| akzeptiert