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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 1

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

alrededor de 7 años hace | 1

| aceptada

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

alrededor de 7 años hace | 1

| aceptada

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

Respondida
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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

Respondida
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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada