Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

My scripts will not run when I click the run button.

조회 수: 1 (최근 30일)
Josue Gil-Silva
Josue Gil-Silva 2020년 9월 30일
마감: MATLAB Answer Bot 2021년 8월 20일
For some reason, every time I try to hit the "Run" button for my script, the program exits the script and goes back to the Folder tab. I have tried restarting and it still doesn't work. How can this be fixed?
  댓글 수: 5
KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 10월 1일
편집: KALYAN ACHARJYA 2020년 10월 1일
It's perfectly OK!
clc;clear all; close all;
x_points = linspace(-1,1,5);
y_points = linspace(-2,2,5);
[X,Y] = meshgrid(x_points, y_points);
%Find the dimensions of the array field by using the "size" command
s = size(X);
%Set x compomnent of ALL vectors to 1
v_x = ones(s);
% Plot the y component, where slope is the ODE
v_y = v_x .* (X + Y.*(1-Y));
% Define vector length
v_length = sqrt(v_x.^2 + v_y.^2);
% Recalibrate so all vectors are equal to 1
v_x = v_x./v_length;
v_y = v_y./v_length;
quiver(X,Y,v_x,v_y)
Josue Gil-Silva
Josue Gil-Silva 2020년 10월 1일
I'm not sure why it's not running for me. I'll keep trying. Thanks!

답변 (0개)

태그

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by