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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 1

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

Beantwortet
How to make x-axis logarithmic for errorbar plot?
Use *semilogx* function

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

Mehr laden