Main Content

Results for

Image Analyst
Image Analyst
Last activity on 16 Oct 2023

MATLAB Road in theaters May 15, 2024.
Image Analyst
Image Analyst
Last activity on 16 Oct 2023

(From "The Exorcist" movie poster)
Image Analyst
Image Analyst
Last activity on 8 Mar 2024

Albert Einstein uses MATLAB
Image Analyst
Image Analyst
Last activity on 24 Oct 2023

Dynamic Field Name shaming
Image Analyst
Image Analyst
Last activity on 16 Oct 2023

We told you "NO!!!"
Image Analyst
Image Analyst
Last activity on 16 Oct 2023

I climbed the L-Shaped Peak
Image Analyst
Image Analyst
Last activity on 5 Dec 2023

Choose your weapon
Image Analyst
Image Analyst
Last activity on 16 Oct 2023

Caution. This is MATLAB.
MATLAB is the best programming language
Image Analyst
Image Analyst
Last activity on 16 Oct 2023

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.