Beantwortet
why is the c of scatter function scaled automatically?
figure() yyaxis left x = linspace(0,3*pi,200); y = cos(x) + rand(1,200); c = linspace(1,10,length(x)); scatter(x,y,[],c) c...

mehr als 4 Jahre vor | 0

Beantwortet
Convolute ramp signal and step signal
x = 1:1:10 ; p = linspace(0.1,1,length(x)); u = ones(1 , length(x)); r = p.*u; y = conv(r,u,'same'); plot(x,y); Try us...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
hello i want to create a table by using the value i obtained from a for loop, how can i get it
x=5 y=30 I = 1 for z=[1 2 4 8] a(I)=x*y*z; xx(I) = x;yy(I) = y; I = I+1; end iwant = table(xx.',yy.',a.','VariableName...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to arrange with the graph
clc; clear; K_t=750; K_r=250; b=5; f_z=0.1; theta=0:360 ; for i = 1: length(theta) if (theta(i) >= 60 & theta(i...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
I can't find the error in this code. Please help with the dimension. Error in line 42
clc clear all close all %% Initial and Boundary conditions %% g = 9.81; J = 1.2./1000; h = 0.075; lambda = 0.075; u_st...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
For loop in for loop
k11=28.21; k21=-4.23; k12=-18.133; k22=2.59; k13=20.815; k23=-2.97; t=0:0.1:3; num_t=length(t); t4=0; t3=-0.3588; t2=...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Operator '+' is not supported for operands of type struct
glucose1_5.date = [glucose1_5.date glucose1_5.time]; Try using the above when adding two different formats

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
pmake engineering stress and strain diagram
F=[0;13345;26689;40479;42703;43592;44482;44927;45372;46276;47908;49035;50265;53213;56161]; L=[25;25.037;25.073;25.113;25.122;25...

mehr als 4 Jahre vor | 0

Beantwortet
Error using vertcat Dimensions of arrays being concatenated are not consistent.
matrix1 = rand(1,3)%input("matrix 1 is \n"); This is example of 1 x3 matrix matrix2 = rand(3,3)%input("matrix 2 is \n")...

mehr als 4 Jahre vor | 0

Beantwortet
Index exceeds matrix dimensions
n = 10; Lx = 1; dx = Lx/(n-1); x = 0:dx:Lx; % 2. Parameters for the t vector m = 80; tf = 0.8; dt = tf/(m-1); t = 0:dt:...

mehr als 4 Jahre vor | 0

Beantwortet
Returning several dataset using ode45
for i = 1:length(r) [t,theta] = ode45(@(t,theta) odefcn(t,theta,f,r,zeta), tspan,Theta0); plot(theta(:,1),theta(:,2));hol...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Storing regression coefficients in a loop
slopes(i,j) = slope; pvals(i,j) = pval;

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
range in fplot as variables
clear clf clc syms x y f=x*y*(x+y); ylim=[x^2 x] ylow=ylim(1); yup=ylim(2); sol=solve(ylim(1)==ylim(2),x) a=sol(1); b=...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Integration of a function
syms x f = 3*x-x^2 ; F = int(f,x); expand(F)

mehr als 4 Jahre vor | 0

Beantwortet
GUI Interpolation calculator, Indices exceeds array?
clear i j n guidata(hObject,handles) clear the loop counter variables used inside the callback function every time the GU...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
xlim is not working
xlim([0 20.5]) % difference Difference in using and = between the xlim and parenthesis

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
if-else function statement problem
function abc(day) if day=='monday' % Do a comparison disp('1'); elseif day=='saturday' % Do a comparison disp('2...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can i run this script to make a plot for a lot of T
T = 100:10:180; x0 =100.8; xyl_zero = 4; % x0 = rand(1,length(T)) for i = 1:length(T) [t,x] = ode45(@acidpretreatment, [0 2...

mehr als 4 Jahre vor | 0

Beantwortet
The left and right sides have a different number of elements
tt(:,i+1)=image(x+n(j,1),y+n(j,2)) Change this line to above

mehr als 4 Jahre vor | 1

Beantwortet
Matlab Error after executing the code
clear all clc kc=[1 2 3 4 5 6 7 8 9 0]; k12=200; k34=300; new1=1:1:10; for l1=1:length(new1) K(:,:,:,:,l1)=[k12 -k...

mehr als 4 Jahre vor | 0

Beantwortet
I need to plot the following script. But it gives an error.
close all clear all %properties of rocks Vs_soil=170; Psoil=1.5; Hs=70; Vs_rock=1000; Prock=2.4; damp=0; %impedan...

mehr als 4 Jahre vor | 2

| akzeptiert

Beantwortet
how to plot a continuous graph in a loop
for k=1:10; x=5; y(k)=2*x-5*k*k*k; plot(1:k,y(1:k),'*'); % use the loop indices to plot in a loop ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
solving an equation and adding results to a matrix
syms m; syms n; k=linspace(-3.5,+0.5); z=zeros(1,100); c=length(k); for s=1:1:100 z =solve((k(s)+1.5).^2+(m-0.75).^2==...

mehr als 4 Jahre vor | 0

| akzeptiert

Frage


How to access *.mat files using Matlab drive and load them ?
D = fullfile(matlabdrive,'data.mat') K = load(D)

mehr als 4 Jahre vor | 1 Antwort | 0

1

Antwort

Beantwortet
Index exceeds number of array elements (1) Heuns method
% step size % h = 0.1; % number of steps % N = 10; x = zeros(1,N); y = zeros(1,N); yt = zeros(1,N); x(1) = 0.1; y(1) =...

mehr als 4 Jahre vor | 0

Beantwortet
column-wise input for string and double data using fprintf
fprintf('%s\n %.3f\n %.3f\n %.3f\n %.3f\n %.3f\n %.3f\n', data_string.', data_numeric.') Add a newline after each format specif...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Colors not showing in legend
legend('Zone1','Zone2','Zone3','Zone4','Zone5','Zone6'); Use a different variable name for legends. It seems you also use i...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can I get a figure from an equation ?
N = 0:10:400; M = 350*(1-(N/4010).^2) plot(N,M) Try regular plot function and check

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
arrays have incompatible sizes for this operation help me PLZ
clear;close all;clc counter=1; min_nl=-10; step_nl=1; max_nl=0; noise_levelsdB=min_nl:step_nl:max_nl; for k=min_nl:step_...

mehr als 4 Jahre vor | 0

Beantwortet
Hello, I'm trying to plot the I-V curve for a MOSFET, but I get a "Vectors must be the same length" error message. I don't understand why this is the case.
clear all; close all; clc; x1 = 0:0.01:6; y1 = (0).*x1-(1/2).*x1.^2; x2 = 0:0.01:6; y2 = (1/2)*x2.^2; x3 = 0:0.01:6; y3 = ...

mehr als 4 Jahre vor | 0

Mehr laden