Respondida
Unable to exportgraphics or saveas: The value of 'destination' is invalid.
savefig(gcf,'ab.fig') Try using savefig

alrededor de 3 años hace | 0

Respondida
How to improve the calculation accuracy of Matlab?
you can use, smoothdata on the resulting matrix l=4; l1=l;%Tx Mode l2=l;%Rx Mode misalignment = -1:1e-3:1; result = zeros(...

alrededor de 3 años hace | 0

Respondida
im trying to display grade scores and their letter grade.
for i = 1:length(s)

alrededor de 3 años hace | 0

| aceptada

Respondida
who do I keep getting this message? Index in position 1 is invalid. Array indices must be positive integers or logical values.
Moment=zeros(); ki=pi/180; kinc=pi/180; kf=pi; ji=5; jinc=5; jf=100; K = ki:kinc:kf; J = ji:jinc:jf; for k=1:numel...

alrededor de 3 años hace | 0

Respondida
Why find doesn't work?
K=[1 2 3 4 5] K(K>=2.7 & K<3.1) % this works, matlab gives 3 Assignment_L(12,1)=2.7; % this equals 2.7 Assignment_U(12,1)=3...

alrededor de 3 años hace | 1

| aceptada

Respondida
make loop if two variable (x and y) present calculate value for (x1 and y1) and store separate name for same formula another calculate for (x2,y2) and store by separate?
x = [1 2 3 4 5]; y= [ 8 3 2 1 6]; % vectorize the equation (easier approach) z = exp(x)+x.*y.^3 +y; % using for loop h...

alrededor de 3 años hace | 1

Respondida
How to insert different size matrices into each row of a zero matrix
syms x [1 10] n = 10; for k = 1:n M(k,1:k) = x(1:k); end M

alrededor de 3 años hace | 0

Respondida
Convert Fahrenheit to Celcius while the inpu Fahrenheit is an array
clear T = 0:10:100; C = (5*(T-32)/9) fprintf('%4.2f F = %4.2f C\n',[T;C])

alrededor de 3 años hace | 0

| aceptada

Respondida
How to solve the error while solving the given equation by ode45 or ode15s?
As the expression states an extra parenthesis is included in this line dTdt(i,j) = k*(Tin(i,j)-k*T(i,j))+(k4(i,j))*T(i,j+1))-k...

alrededor de 3 años hace | 0

Respondida
Custom Lognormal curve fitting equation using curve fitter in matlab
complete the if-else-end condition using the keywords end , else-if and try, Also in the if condition, there is a missing mul...

alrededor de 3 años hace | 0

Respondida
Wind rose plotting issue
v=[5 15 4; 1 0 0; 13 5 3; 7 0 0; 10 1 2; 11 0 0; 19 2 1; 1 0 0]; %Percentage of winds d=[0 0 0; 45 45 45; 90 90 90; 135 135 1...

alrededor de 3 años hace | 0

| aceptada

Respondida
Only the last value are being stored in for loop
a(iComb)=ExtSurgeBinEdges_Lo(IndMatFA(iComb,1)); b=[]; % put this line outside of loop b(iComb)=ExtSurgeBinEdges_Md(Ind...

alrededor de 3 años hace | 0

| aceptada

Respondida
I cannot detect an error on Newton Method.
function [x,n,error] = NewtonRaphson(f,a,eps_f,eps_x,df,maxits) %>> df % r...

alrededor de 3 años hace | 0

| aceptada

Respondida
how to use solve
syms b x a sol=solve ((2*cos(x) - b*(sin(x) + sin(a*x))) == 0,[x a b]) %chooses 'x' as the unknown and returns sol.x sol.a ...

alrededor de 3 años hace | 0

| aceptada

Respondida
I can't run the code I wrote the way I want. Please help me
%Plot P-V diagram of a given substance using peng robinson equation of state %Substance properties are defined by the peng robi...

alrededor de 3 años hace | 0

Respondida
Array elements are recalculated every iteration
This is one approach, where you can initialize a variable k and iterate along the time step nRows = ceil(endTime / ep.timestep...

alrededor de 3 años hace | 0

Respondida
imshow displays blank figure
img = imread('image.png'); imshow(img); Change the syntax for *imread* as above.

alrededor de 3 años hace | 0

Respondida
How to plot performance data based on process ID?
Data = [1680569427 83321 73.3 1680569427 83325 0.0 1680569427 83326 0.0 1680569427 83327 0.0 1680569427 83328 0.0 168056942...

alrededor de 3 años hace | 0

| aceptada

Respondida
Problems with a function of matrix
Call the function from command window and not from inside the script file where you have the code % call the function from com...

alrededor de 3 años hace | 0

| aceptada

Respondida
Index in position 1 is invalid. Array indices must be positive integers or logical values.
Change this line from s = s + v(x,y) * img(k,l); to s = s + v(x,y) * img(abs(k),abs(l)); in your code. The indices become ne...

alrededor de 3 años hace | 0

Respondida
Problema al escribir en látex el nombre de un eje
ylabel('$\ddot{z_c}$','Interpreter','latex','fontsize',20)

alrededor de 3 años hace | 1

| aceptada

Respondida
Normalizing an FFT Vector
Try with fftshift function , L = 100; x = linspace(0,L,L+1); psi = sqrt(2/L)*sin(pi*x/L); %particle in a box ground state% ...

alrededor de 3 años hace | 1

Respondida
My error says "Unrecognized function or variable 'CP'." What can I add to the script so that I can define it?
None of the if statements for variables IoDR, IoDL are being executed. Can you check if the preceding if conditions for variable...

alrededor de 3 años hace | 0

Respondida
Subscript indices must either be real positive integers or logicals always show up. what should i do?
%% Beam Properties L = 0.35; % Length of the beam (m) w = 0.02; % Width of the beam (m) t = 0.002; % thickness ...

alrededor de 3 años hace | 0

| aceptada

Respondida
Calculate normal and shear stress of a beam where values of depth and width are under certain conditions
close all clear clc b = 1:200; d = 1:200; A = 2640; F = 300e3; d_max = 125; b_min = 20; NL = length(b); sigma_max = ...

alrededor de 3 años hace | 0

| aceptada

Respondida
forcing the final column in a matrix to be zero
k = 10 a = ones(3,k) b = -1; if b < 1 a(:,end) = 0; end a

alrededor de 3 años hace | 0

| aceptada

Respondida
Ideal Pressure Sensor, Static Head or Total Head?
The pressure sensor available in Simscape measures the total head or effective head. As you say there is no diameter to evalua...

alrededor de 3 años hace | 0

Respondida
How do I make two variables the same number for conditions in a if=else statement?
Following the truth table output for xor and as suggested by @Walter Roberson , you would also need to change the if-else cond...

alrededor de 3 años hace | 0

Respondida
How can I change a variable once at a specific point inside of a for loop?
You can change the sign of v_robot variable num_states = 2001; v_robot = 0.1; stdev_odometry = 0.1; delta_t = 0.1; b = zer...

alrededor de 3 años hace | 0

Respondida
I am trying to create a function that shows the average grade of an entire class but my answer is in matrix form.
for student=1:Nstudent; ClassAverage(student)=mean(setOfData(:)); end ClassAverage = ClassAverage(1); Add the above line...

alrededor de 3 años hace | 0

Cargar más