已回答
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 ...

3 years 前 | 0

| 已接受

已回答
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...

3 years 前 | 0

已回答
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...

3 years 前 | 0

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

3 years 前 | 0

已回答
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...

3 years 前 | 0

| 已接受

已回答
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...

3 years 前 | 0

| 已接受

已回答
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...

3 years 前 | 0

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

3 years 前 | 1

| 已接受

已回答
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% ...

3 years 前 | 1

已回答
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...

3 years 前 | 0

已回答
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 ...

3 years 前 | 0

| 已接受

已回答
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 = ...

3 years 前 | 0

| 已接受

已回答
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

3 years 前 | 0

| 已接受

已回答
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...

3 years 前 | 0

已回答
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...

3 years 前 | 0

已回答
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...

3 years 前 | 0

已回答
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...

3 years 前 | 0

已回答
Save .fig file as .eps file
plot(1:10) saveas(gcf,'Linechart','epsc')

3 years 前 | 0

已回答
Subscript indices must either be real positive integers or logicals.
[XX,YY] = meshgrid(linspace((Lat1(minlat),(Lat1(maxlat),n),linspace((Lon1(minlon)),(Lon1(maxlon),n))

3 years 前 | 0

已回答
How to make x-axis logarithmic for errorbar plot?
Use *semilogx* function

3 years 前 | 0

已回答
Boxplot and Plot Overlay Problem
As you say, X, Y1 , Y2 are same size and since Y2 (c) is a vector with mean of each year, plot the graph using the unique va...

3 years 前 | 0

已回答
Reynolds stress plot error
clear all; close all; clc; U_inf = 100; % free stream velocity in m/s L = 1; % plate length in m nu = 1.5e-5; % kinematic v...

3 years 前 | 0

| 已接受

已回答
Why am I getting an error for mismatched number of elements?
Few changes that may be required are below. Test your code after those changes x = zeros(n,1); for i = 1:n .. S = ...

3 years 前 | 0

已回答
How to pass on arguments in the form of two grids and return a matrix the elements of which involve conditional statements?
N = 4; DT = 1/N; t = linspace(DT/2, 1-DT/2, N)'; r = t + 0.3 * DT; [rr, tt] = ndgrid(r, t); a = f(rr, tt) function ...

3 years 前 | 0

已回答
How to extend a vector continuously in a loop
ini_vector=[par.nN2_in par.nH2_in 0 0 0.01 0 0 0 0 0.999]; Initial = repmat(ini_vector,1,8)

3 years 前 | 0

| 已接受

已回答
2D array to 1D with rows appending after another row
A = A.' A(:)

3 years 前 | 1

已回答
I need help plotting using this while loop
xx = linspace(-5,9,85); w=0 while w<85 w=w+1; fxx(w) = ((xx(w)+1)^2)./(2+5*xx(w)); end plot(xx,fxx)

3 years 前 | 1

| 已接受

已回答
My Code is giving indexing error, I am unable to fix it.
one way to verify the exact and approximate solutions is to vary boundary conditions suitably , % Clear all variables and clos...

3 years 前 | 0

已回答
I am trying to do numerical integration to find the work out in a problem with less than 0.1% error.
From your comments in the code, as i understand if the temperature is < 300K , then efficiency is not possible to evaluate. I h...

3 years 前 | 0

已回答
I'm running into an error at line 40, which is prompting me that I have an "invalid or deleted object". I'm wondering how to mend this.
P0 = [1,2,3]; P1 = [2,4,5]; P2 = [3,4,5]; P3 = [50,2,3]; P = [P0;P1;P2;P3]; t = linspace(0,1,100); tint = length(t); A = one...

3 years 前 | 0

加载更多