結果:

MATLAB Men

MATLAB rule!

So true.

MATLAB Road in theaters May 15, 2024.

(From "The Exorcist" movie poster)

Albert Einstein uses MATLAB

Dynamic Field Name shaming

We told you "NO!!!"

I climbed the L-Shaped Peak

Choose your weapon

ChatGPT has Fallen.

MATLAB vs. Python

Caution. This is MATLAB.

MATLAB is the best programming language

I love the smell of debugged MATLAB code in the morning. Smells like...Victory!
Earlier this year a bunch of MATLAB users got together to talk about their hobbies in a lightning talk format.
- Using "UIHTML" to create app components and Lightning
- Creating generative art with MATLAB
- Making MATLAB run on the Steam Deck (it was a wager)
Do you use MATLAB for hobbies?
Hi,
I'm trying to use subs to subsitute x and y coordinates into a symbolic equation so I can solve it for the value at each coordinate. Below is how my code is currently sctructured.
%% Creating Fluid Equations
syms x y
vel_x = sin(x) + cos(y);
vel_y = cos(x)^2 + sin(y)^0.5;
pressure = 101300 * (x*exp(y));
density = 1.2 * (x^2 + y^0.5);
%% Plotting Fluid Equations
x_input = 0:0.1:10;
y_input = 0:0.1:10;
[x_coord, y_coord] = meshgrid(x_input, y_input);
% Subsitute symbolic variables with x and y arrays and turn into array of
% doubles
vel_x = double(subs(vel_x, [x, y], {x_coord, y_coord}));
vel_y = double(subs(vel_y, [x, y], {x_coord, y_coord}));
pressure = double(subs(pressure, [x, y], {x_coord, y_coord}));
density = double(subs(density, [x, y], {x_coord, y_coord}));
surf(x_input, y_input, vel_x)
This code is already taking 5 whole seconds to run and ideally I'd like to increase the density of coordinates. I was trying to stay away from using for loops wich is how I ended up using meshgrid and subs instead. How can I make this much more efficient?
Any advice would be much appreciated thank you!
Is there a way to generate "typedef short int" and typedef "unsigned short int"? I want this for my harware but what I get is only "typedef int" and typedef "unsigned int" irrespective of various hardware I selected including custom hardware.